my ($content, $IN); unless (open ($IN, "<", $file)) { die "Error in reading '$file': $!\n"; } # unless else { local $/ = undef; # valid only until end of block binmode($IN); $content = <$IN>; close ($IN); } # else #### unless (open ($IN, "<", "file1.txt")) { die "Error in reading 'file1.txt': $!\n"; } # unless