Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Coding superstitions

by FoxtrotUniform (Prior)
on Jan 08, 2002 at 00:39 UTC ( [id://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

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (2)
As of 2024-04-25 19:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found