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

Re: Two simple code style advice questions

by vinoth.ree (Parson)
on Jan 16, 2013 at 11:02 UTC ( #1013559=note: print w/ replies, xml ) Need Help??


in reply to Two simple code style advice questions

I prefer only the following

1.Initializing a hash

my %ntests = map { $_ => 0 } @tests;

2.Setting a string to a value or the empty string

my $mol = ($n == 42) ? "forty two" : ""


Comment on Re: Two simple code style advice questions
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2014-11-23 03:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (128 votes), past polls