use strict; my $file; open(FH,"<",$file) || die "Unable to open file: $!\n"; { local $/; $file = ; } close(FH);