use Module::Locate 'acts_like_fh'; sub fizbin { my($str, $infh, $outfh) = @_; -e $_ or acts_like_fh $_ or die "Invalid file name/handle '$_'" for $infh, $outfh; ... }
_________
broquaint
In reply to Re: Accepting either a filename or a handle
by broquaint
in thread Accepting either a filename or a handle
by fizbin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |