in reply to Re^2: How to make an IO::Uncompress::Bunzip2 look like a GLOB
in thread How to make an IO::Uncompress::Bunzip2 look like a GLOB

Ouch, then  *{$file}{IO}, see *glob{FILEHANDLE}

Probably the best idea is to simply try to use $file without checking what it is

$file->print('asdf');