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

Re: Two simple code style advice questions

by vinoth.ree (Monsignor)
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" : ""

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1013559]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2017-04-24 21:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (447 votes). Check out past polls.