Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Wrong idioms

by vsespb (Hermit)
on Mar 30, 2013 at 09:43 UTC ( #1026261=note: print w/ replies, xml ) Need Help??


in reply to Wrong idioms

sub readfile { my $filename = shift or return; ... }
If this code should only check that filename is defined (i.e. allow empty string), you can write (even for perl <5.10) it like this:
defined(my $filename = shift) or return;


Comment on Re: Wrong idioms
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2015-08-29 10:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The oldest computer book still on my shelves (or on my digital media) is ...













    Results (343 votes), past polls