My script would then need to capture the contents of file.txt into an array. The following code does not accomplish this:script.pl < file.txt
#!/usr/local/bin/perl -w use strict; my $line; foreach $line (@ARGV) { print "The line is: $line\n"; }
In reply to Pipe File contents into Perl Script by smack
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |