in reply to FileHandles in a Hash
The <> operator has DWIM magic to act either as glob or readline.
So it tries to use your hash like a list of filename patterns to be expanded like glob does.
Like others indicated just use readline to avoid ambiguity or copy the hash element to a simple scalar.
HTH! :)
Cheers Rolf
( addicted to the Perl Programming Language)
see I/O Operators:
If what's within the angle brackets is neither a filehandle nor a simple scalar variable containing a filehandle name, typeglob, or typeglob reference, it is interpreted as a filename pattern to be globbed, and either a list of filenames or the next filename in the list is returned, depending on context.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: FileHandles in a Hash (<> ambiguity)
by morgon (Priest) on May 28, 2014 at 22:10 UTC | |
by LanX (Saint) on May 29, 2014 at 01:58 UTC |