in reply to Re^2: Pipe File contents into Perl Script
in thread Pipe File contents into Perl Script
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
| A reply falls below the community's threshold of quality. You may see it by logging in. |