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: [bishop] my parameters won't pass through a pipe: Edit Log



KevinR
Veteran


Jul 30, 2009, 8:31 PM


Views: 2193
Re: [bishop] my parameters won't pass through a pipe

I have the same problem on Vista but it works for me like this:


Code
use strict;  
use warnings;

my $PARAMETERS = "parameters";

open (OUTPUT,"perl c:/PerlTest/foo.pl $PARAMETERS|") or die "$!";
my $testresult = <OUTPUT>;
close (OUTPUT);

print $testresult;


Code for foo.pl:


Code
#!perl 
print "@ARGV";
exit;


Even though I have .pl set to open with perl (strawberry perl 5.10 on Vista 64 bit) it will not pass the parameters unless I include perl on the open line. Perl is in the command path so just using "perl" works. I can't find how to do what Fish suggests on Vista.
-------------------------------------------------


(This post was edited by KevinR on Jul 30, 2009, 8:33 PM)


Edit Log:
Post edited by KevinR (Veteran) on Jul 30, 2009, 8:31 PM
Post edited by KevinR (Veteran) on Jul 30, 2009, 8:33 PM


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

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