Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

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

by Pascal666 (Scribe)
on Sep 04, 2009 at 03:55 UTC ( #793356=note: print w/replies, xml ) Need Help??


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

The statement:

if(UNIVERSAL::can($file,'print')){...}

does not appear to work. I have tried passing it both a string and a GLOB and it never seems to evaluate to true.

Replies are listed 'Best First'.
Re^3: How to make an IO::Uncompress::Bunzip2 look like a GLOB
by Anonymous Monk on Sep 04, 2009 at 04:51 UTC
    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');

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://793356]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2020-10-23 03:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (234 votes). Check out past polls.

    Notices?