Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
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 wandering the Monastery: (7)
As of 2014-08-23 01:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (171 votes), past polls