Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^2: globbing filehandles in arrays

by why_bird (Pilgrim)
on Jan 26, 2009 at 08:35 UTC ( [id://738879]=note: print w/replies, xml ) Need Help??


in reply to Re: globbing filehandles in arrays
in thread globbing filehandles in arrays

You're using 3-arg open which was introduced at the same time as lexical file handles, so it's not a backwards compatibility issue.

Wow, I have to say I'm surprised that I really didn't know about something as basic as that!! Just goes to show what perlmonks can teach you. Strange also because I've found the global non-lexical file handles a real pain in the past and have never realised you could do it like that. I consider myself well and truly corrected (and pleased!)

For future reference, here is the (most?) relevent perldoc documentation, which strangely I hadn't come across (or perhaps rather read thoroughly) before. Also, perlopentut says the above explicitly, which I notice now that I come to look for it!

It still seems to be true though that the vast majority of examples in open and perlopentut are given using those old global filehandles, which I find a bit strange if it's not 'recommended' behaviour (I would certainly not recommend it!). Is this just because the documentation is old, or is there another reason?

Thanks
why_bird
........
Those are my principles. If you don't like them I have others.
-- Groucho Marx
.......

Replies are listed 'Best First'.
Re^3: globbing filehandles in arrays
by ikegami (Patriarch) on Jan 26, 2009 at 13:54 UTC

    Probably just because noone got around to doing it ...until recently. It's finally been fixed in bleed (5.12 to be) and backported to maint-5.10 (5.10.1 to be).

    There's still lots of example with non-lexical file handles if you're looking for something to do :)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (7)
As of 2024-03-28 15:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found