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

Home » Public Forums » archive » 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
Calling IDL from Perl [message #26971] Wed, 03 October 2001 10:35
gary.hodgesREMOVE is currently offline  gary.hodgesREMOVE
Messages: 9
Registered: October 2001
Junior Member
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.

Cheers,
Gary


#!/usr/bin/perl
open(IDL, "|/usr/local/bin/idl");
print IDL ".Compile loop \n";
print IDL "loop \n";
@ary=(5,6,7,8);
for (@ary) {
print "$_\n";
}
----------------------------------
PRO LOOP
FOR j=1,4 DO BEGIN
Print, j
ENDFOR
END
==================================
The output when I run the Perl code is:

phoenix> perl loop.pl
5
6
7
8
phoenix> IDL Version 5.4 (sunos sparc). (c) 2000, Research Systems, Inc.
Installation number: 100780-40.
Licensed for use by: OAR/ARL:Chris Cornwall:SUN100

% Compiled module: LOOP.
1
2
3
4
[Message index]
 
Read Message
Previous Topic: Global Variable
Next Topic: Drawing 2 or 3 contours on a same image

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

Current Time: Wed Oct 08 18:32:09 PDT 2025

Total time taken to generate the page: 0.00228 seconds