comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Calling IDL from Perl
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Calling IDL from Perl [message #26965 is a reply to message #26963] Wed, 03 October 2001 12:20 Go to previous message
John-David T. Smith is currently offline  John-David T. Smith
Messages: 384
Registered: January 2000
Senior Member
gary.hodgesREMOVE@cires.colorado.edu wrote:
>
> OK, I have distilled my problem down to the simplest example I can. My
> problem is that the Perl script finishes before the IDL script is executed.
> I have tried sleep commands, but the results are the same. What can I do to
> get the IDL script to execute before the Perl script prints the contents of
> @ary? Below are the two scripts and the output.

Not that this is a perl list, but try:

#!/usr/bin/perl
open(IDL, "|/usr/local/bin/idl");
print IDL ".Compile loop \n";
print IDL "loop \n";
close IDL; #THIS ONE CRITICAL
@ary=(5,6,7,8);
for (@ary) {
print "$_\n";
}

Since you weren't closing the filehandle, the IDL input was not being
flushed, until after the program exited (at which point it was forced
close).

JD
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: right-justifying draw widgets?
Next Topic: Re: Is there a line widget

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 15:14:18 PDT 2025

Total time taken to generate the page: 1.75780 seconds