Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Re: Re: Determining indirect filehandles

by Masem (Monsignor)
on Jan 23, 2002 at 19:44 UTC ( #140906=note: print w/replies, xml ) Need Help??

in reply to Re: Determining indirect filehandles
in thread Determining indirect filehandles

Gah, you're right. I didn't test the seek solution with any pipes, and while I did test things like array refs, I didn't test it with scalars directly (mostly because in the app that I want this for, I've already removed scalars from the possible values this snippet would have gotten). However, looking around, it does look like fileno does the trick; pipes are properly recognized, but anything that's not a filehandle triggers a warning. So eval'ing that away captures non-filehandles correctly - at least, as best as I can tell. Snippet above has been updated to reflect this.

Dr. Michael K. Neylon - || "You've left the lens cap of your mind on again, Pinky" - The Brain
"I can see my house from here!"
It's not what you know, but knowing how to find it if you don't know that's important

  • Comment on Re: Re: Determining indirect filehandles

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2016-10-23 00:24 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (299 votes). Check out past polls.