Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
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 ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://793356]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (3)
As of 2024-03-28 17:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found