For example:
The special $/ which can be used to slurp an entire file at once if you don't really need to loop over the lines.
sub getfile {
my $filename = shift;
open HANDLE, "< $filename" or die "Couldn't open `$filename': $!";
local $/ = undef; # Read entire file at once
$contents = <HANDLE>; # Return file as one single `line'
close HANDLE;
return $contents;
}