in reply to reading files from a directory

Many objects have an underlying hash structure. When you print them, you get HASH(0xnnnnnnnn). File handles are based on typeglobs, when you print them you get GLOB(0xnnnnnnnn). This is what you're seeing here. Here's an example:

$ cat > fh_test This is fh_test $ perl -wE 'open my $fh, q{<}, q{fh_test} or die $!; while (<$fh>) { p +rint }' This is fh_test $ perl -wE 'open my $fh, q{<}, q{fh_test} or die $!; while (< $fh >) { + print }' GLOB(0x10053ad8)

toolic gave you the fix for IN. I also note you'll need the same fix for $fh. I'd check if you have any other instances of this.

-- Ken

Replies are listed 'Best First'.
Re^2: reading files from a directory
by kevyt (Scribe) on Oct 28, 2010 at 05:51 UTC
    Thanks Ken!