in reply to Re: File Stricture Help
in thread File Stricture Help

reads from the filehandle $file (which isn't a filehandle
Yes and no. It's a string being passed to 1-arg open and readline, which are glob contexts. So it's interpreted as a symbolic glob reference (and a glob reference is the typical type of a filehandle), which makes strict complain.

But without strict, it works just fine as a filehandle:

$ perl -we'$file = "foo.bak"; ${"foo.bak"} = "seq 10|"; open $file or +die "nope:$!"; print for <$file>' 1 2 3 4 5 6 7 8 9 10

Replies are listed 'Best First'.
Re^3: File Stricture Help
by chromatic (Archbishop) on May 14, 2008 at 17:15 UTC

    I just didn't want to say "symbolic filehandle coercion".