Perl : read file line by line

Got this spell after peeking at here
chomp here is to remove ‘newline’ character

#!/usr/bin/perl -w

open(infile, "<end_res");
while()
{
my($line) = $_ ;
chomp($line);
print outfile "$line";
}
close(infile);

Advertisements