LogikWeaver
Registered
I am having trouble with getting pipes to work. I have one file called test1.pl that is the below:
#!/usr/bin/perl
print 'hi';
I also have a file called test2.pl in the same directory that is the below:
#!/usr/bin/perl
open(TEST, "test1.pl |")||die("error: $!");
$file=<TEST>;
print "Got this input: $file\n";
When I run test2.pl as "perl test2.pl" from the command line, the program dies, and says that there is no test1.pl
What is wrong? Thanks in advance
#!/usr/bin/perl
print 'hi';
I also have a file called test2.pl in the same directory that is the below:
#!/usr/bin/perl
open(TEST, "test1.pl |")||die("error: $!");
$file=<TEST>;
print "Got this input: $file\n";
When I run test2.pl as "perl test2.pl" from the command line, the program dies, and says that there is no test1.pl
What is wrong? Thanks in advance