Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^2: I most recently did it in the...

by Nkuvu (Priest)
on Mar 28, 2004 at 22:17 UTC ( #340442=note: print w/ replies, xml ) Need Help??


in reply to Re: I most recently did it in the...
in thread I most recently did it in the...

You know, you can reduce the level of indentation (thus making it easier to read (IMHO, of course)) of this sub by using elsif:

sub whatisit{ my $it = shift; if ($it eq 'yada yada'){ return(undef); } elsif ($it eq 'get in a car accident') { return("vincinity of 38.86540N 77.07163W"); } elsif ($it eq 'write perl script'){ return ('kitchen'); } else{ return(\&email(zak)); } }

I know this is pretty trivial code, but...


Comment on Re^2: I most recently did it in the...
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (7)
As of 2015-07-01 23:18 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 (24 votes), past polls