You probably noticed that I forgot to localize $/ in that snippet I sent previously (not that it matters in this case -- just a point of maintaining good habits):
#!/usr/local/bin/perl
my $fname = "path/name_of.file";
open( IN, $fname );
{
local $/ = undef;
$_ = <IN>;
}
close IN;
printf("File size = %d, slurped string size = %d\n", -s $fname, length());
__END__
