Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Simple question about foreach and my.

by arhuman (Vicar)
on Mar 27, 2001 at 18:06 UTC ( [id://67493]=note: print w/replies, xml ) Need Help??


in reply to Simple question about foreach and my.

I find the 'my' form better, for several reasons...
(speed, style...)

But I've seen a lot of experienced programmers using the older form (without my).
(By example, in the Advanced Perl Programming almost all examples don't use 'my')

NOTE : I should add that the speed aspect is only minor,
and this case is one of the (rare) special case where you can use 'my' without making a long code unbearable...
A good discussion on 'my', its danger, its speed gain and optimization could be find here.

"Trying to be a SMART lamer" (thanx to Merlyn ;-)
  • Comment on Re: Simple question about foreach and my.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (2)
As of 2024-04-26 03:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found