in reply to Re: Pipe File contents into Perl Script
in thread Pipe File contents into Perl Script

This worked, Thanks!

“There are no cats in America, and the streets are paved with cheese.” -Fievel Mousekewitz
  • Comment on Re^2: Pipe File contents into Perl Script

Replies are listed 'Best First'.
Re^3: Pipe File contents into Perl Script
by kyle (Abbot) on Sep 21, 2007 at 18:00 UTC
    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.

    A reply falls below the community's threshold of quality. You may see it by logging in.