- local *IN;
- my $body = '';
- error ("$file: $!") unless open (IN, "<$file");
- while (<IN>) { $body .= $_; }
- close IN;
+ my $in;
+ open ($in, '<', $file) ||
+ open ($in, '<', $file2) ||
+ error ("$file: $!");
+ local $/ = undef; # read entire file
+ my $body = <$in>;
+ close $in;