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

Re: checking $option

by ikegami (Patriarch)
on Jun 26, 2009 at 07:34 UTC ( #774949=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $source_file = defined($options{o}) ? $options{o} : 'as.xcf-dist';
    
  2. or download this
    my $source_file = 'as.xcf-dist';
    $source_file = $options{o} if defined($options{o});
    
  3. or download this
    my $source_file = $options{o};
    $source_file = 'as.xcf-dist' if !defined($options{o});
    
  4. or download this
    sub defined_or { defined($_[0]) ? $_[0] : $_[1] }
    my $source_file = defined_or( $options{o}, 'as.xcf-dist' );
    
  5. or download this
    # Requires 5.10
    my $source_file = $options{o} // 'as.xcf-dist';
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2022-08-16 09:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?