in reply to check scalar holds filehandle
if ('GLOB' eq ref $param) { print "filehandle"; } else { print "filename"; }
Update: it doesn't work with things like *ARGV{IO}. See AnonymousMonk's reply below.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: check scalar holds filehandle
by Anonymous Monk on Oct 30, 2015 at 08:34 UTC |