while (<$foo>) # Read in a line to $_
{
print <$foo>; # Print the rest of the file
}
####
while (<$foo>) # Read in a line to $_
{
print; # Print $_
}
####
print while (<$foo>); # Read in lines and print them
####
print <$foo>; # Print all lines from the file
####
# -- IO Implementation --------------------------------
use IO::File;
my $file = 'foo.txt';
my $handle = new IO::File ($file)
|| die "Could not open $file\n";
print $handle->getlines();
$handle->close();
# -- Traditional --------------------------------------
my $file = 'foo.txt';
open (FILE, $file) || die "Could not open $file\n";
print ;
close (FILE);