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.
In reply to Re: check scalar holds filehandle
by choroba
in thread check scalar holds filehandle
by bagyi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |