Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Coding superstitions

by FoxtrotUniform (Prior)
on Jan 08, 2002 at 00:39 UTC ( #136934=note: print w/ replies, xml ) Need Help??


in reply to Coding superstitions

I always make explicit dereferences, even with AoAs and suchlike:

my $bar = $foo->[0]->[1]->{'two'};

(Although, since I think this actually improves my code's readability, I guess it isn't really a superstition.)

I also use both & and parens when calling functions, even as I am certain in the knowledge that it will bite me in the arse sometime in the misty future:

&do_stuff();

I also quote hash keys, for consistency.

--
:wq


Comment on Re: Coding superstitions
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (11)
As of 2015-07-05 10:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (61 votes), past polls