Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: hashes of arrays

by SuperCruncher (Pilgrim)
on Apr 04, 2001 at 02:51 UTC ( [id://69504]=note: print w/replies, xml ) Need Help??


in reply to hashes of arrays

This isn't really answering your question, but I feel it is important to point out something that you're doing.
open(FILE,"$_");
When you do "$foo", it incurs a slight performance hit. Simply $foo on its own is better. Also, apparently, if $foo happens to be a scalar reference, Perl will dereference it if you don't put it in quotes, but won't otherwise. I doubt you want to open a file named with the memory address of the reference?

See the part of the Perl FAQ that says "What's wrong with always quoting "$vars"?"

Replies are listed 'Best First'.
Re: Re: hashes of arrays
by dws (Chancellor) on Apr 04, 2001 at 03:03 UTC
    The performance hit for stringfying $foo pales in comparison to the overhead of the open().

    Don't worry about performance at this level. It's like trying to pry small stones out of your tires so that your car will go faster. It just isn't worth it. Worry about effective use of your time, and your reader's time, instead.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2024-04-23 22:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found