Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: My 'perldar' tells me there is a 'better' solution for this list operation

by Jenda (Abbot)
on Nov 04, 2006 at 17:20 UTC ( [id://582252]=note: print w/replies, xml ) Need Help??


in reply to Re: My 'perldar' tells me there is a 'better' solution for this list operation
in thread My 'perldar' tells me there is a 'better' solution for this list operation

I don't think you gain anything this way. Except that you exercise your fingers more. And I don't think it's good to predeclare your variables. You should keep the scope of all variables as small as posible, declaring them only as you intend to start using them. Sometimes it's even good to introduce a block into the code just so that you could specify the scope of a variable, if you want to use it just in those ten lines and not anywhere else. Everything is IMHO of course.

  • Comment on Re^2: My 'perldar' tells me there is a 'better' solution for this list operation

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (2)
As of 2024-04-16 15:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found