Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Coding superstitions

by YuckFoo (Abbot)
on Jan 08, 2002 at 00:14 UTC ( #136926=note: print w/ replies, xml ) Need Help??


in reply to Coding superstitions

Ok George,

I confess I always wrap array references: @{$arr}
I also use many unnecessary parens: my ($onevar);
Subroutines that return values always: return $value;
And I avoid using $_.

Thanks for providing the opportunity to confess my transgressions, interesting subject, but I am still unable to commit to changing my superstitious ways.

I am curious why you would never use whitespace in a hash key. Quoting hash keys for consistency seems reasonable to me. Maybe the real, underlying, superstition is whitspace in hash keys?

YuckFoo


Comment on Re: Coding superstitions
Re: Re: Coding superstitions
by Juerd (Abbot) on Jan 08, 2002 at 00:17 UTC
    Those parens around $onevar with your my create list context, which may or may not be what you want.

    2;0 juerd@ouranos:~$ perl -e'undef christmas' Segmentation fault 2;139 juerd@ouranos:~$

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (10)
As of 2014-07-14 10:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (257 votes), past polls