open (PAGE, $filename) || die "Can't open $filename: $!"; my $text = ; close PAGE || die "Can't close $filename: $!"; # parse $text somehow #### my $text; # outside of the block so it's in scope after we leave the block { local $/; open (PAGE, $filename) || die "Can't open $filename: $!"; $text = ; close (PAGE) || die "Can't close $filename: $!"; }