Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Two simple code style advice questions

by vinoth.ree (Prior)
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 perusing the Monastery: (3)
As of 2015-07-03 22:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (57 votes), past polls