To put the file into an array:
my @file_lines = <>;
To read it line by line:
while ( my $line = <> ) { print "The line is: $line"; push @file_lines, $line; }
You might also want to look at chomp, if you don't want line endings on your lines.
In reply to Re: Pipe File contents into Perl Script
by kyle
in thread Pipe File contents into Perl Script
by smack
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |