CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner: Re: [FishMonger] my parameters won't pass through a pipe: Edit Log



KevinR
Veteran


Jul 31, 2009, 11:20 AM


Views: 2086
Re: [FishMonger] my parameters won't pass through a pipe

OK, I tried a few things. In the script being called if I do this:


Code
print "@ARGV";


then I get back of course the stringified scalar of @ARGV which will be one string. If I do this:


Code
print "$_" for @ARGV;


I get the same thing. If I do this:


Code
print "$_\n" for @ARGV;


and in the other script I have to return the output to a list:


Code
my @testresult = <OUTPUT>;


then everything works as it should and now that I think about it, that's the way it should work. Returning the output of the script to a scalar will only get the first "line" back.

The called script has to print an output record separator and the calling script has to get the results back in a list or using "while".
-------------------------------------------------


(This post was edited by KevinR on Jul 31, 2009, 11:26 AM)


Edit Log:
Post edited by KevinR (Veteran) on Jul 31, 2009, 11:22 AM
Post edited by KevinR (Veteran) on Jul 31, 2009, 11:26 AM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives