kyle@x:~$ cat perlmonks.pl #!/usr/bin/perl use strict; use warnings; my @file_lines; while ( my $line = <> ) { print "The line is: $line"; push @file_lines, $line; } kyle@x:~$ cat file.txt line one line two line three kyle@x:~$ perl perlmonks.pl < file.txt The line is: line one The line is: line two The line is: line three
Show us the code that's not working, and maybe we can help.
In reply to Re^3: Pipe File contents into Perl Script
by kyle
in thread Pipe File contents into Perl Script
by smack
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |