open (IN, "< $file") or warn ("Can't open $file: $!\n"), die; my $data = do { local $/; }; # file slurping print ("$file ==> $data\n"); close(IN);