I'm running the following code:
open my $fh, "<", $file;
$/ = undef;
my $report = <$fh>;
$/ = "\n";
close $fh;
print("$report\n\n");
$file refers to a text file that looks like this:
a 1
b 2
c 3
I ran this code on two different Linux boxes. One of them gave me the expected output (exactly as it appears in the text file). The other one gave me this instead:
GLOB(0x80f1174)
... which effectively prevents me from further manipulating the contents.
I checked the Perl versions - the one the gives me the expected output is 5.10, while the other one is 5.8. However, I have executed the exact same code against similar files in the past with 5.8 that worked.
I've also tried converting the file from DOS to UNIX via :set ff=unix, but to no avail.