in reply to check scalar holds filehandle

Does the following work for you?
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