in reply to Calling many perl scripts from one master perl script
First off, from what I can tell, your first program doesn't have any output. (Hard to tell without code tags.)
Second, even any output it did have should be captured by the back-ticks. Thus, you wouldn't "see" the output - it would be stored in $results. Which is probably what you want, but I can't quite be sure. Ideally, you'd explain what you expect from this, and then we could talk about why it isn't doing what you expect, and what it would take to get where you want to go. (Computers are funny - they do exactly what you tell them, even if that's not what you meant ;->)
Third, and this is pretty minor, your perl is probably not called "usr/bin/Perl" - it's probably "/usr/bin/perl" (note the leading slash, and lower-case perl).
Finally, my last minor nit, and here we're scraping the barrel: stime.pl should have the hash-bang line in it, or you should use $^X to call perl for stime.pl. The former allows stime.pl to control which interpreter to use (I have two different perls on my system), the latter allows your controller's hash-bang line to control the interpreter. The current code puts the onus on the backtick line to figure out the perl, which makes it harder to change later, and you may be surprised what you get. The stime.pl may expect one thing, and controller.pl or whatever may expect something else, and they may both be wrong... (I would go for a hash-bang line in stime.pl and get rid of the "perl" in the $results line.)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Calling many perl scripts from one master perl script
by Nesh (Beadle) on Feb 15, 2005 at 00:10 UTC | |
by LassiLantar (Monk) on Feb 15, 2005 at 03:16 UTC |