Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Sequential defined-or operators

by naikonta (Curate)
on Jan 14, 2008 at 06:01 UTC ( #662262=perlquestion: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $default = 0;
    my $input_number = $ARGV[0];
    
    my $number = defined $input_number ? $input_number : $default;
    
  2. or download this
    my $number = $input_number // $default;
    
  3. or download this
    my $default_theme = get_default_theme();
    my $global_config = read_config('/path/to/config_file');
    ...
                        $default_theme                                :
    
                        'none';
    
  4. or download this
    my $theme = $global_config->{modes}{$current_mode}{theme} //
                $theme_config->{current_theme} //
                $default_theme //
                'none';
    
  5. or download this
    my $theme = (
                  (
    ...
                )
                //
                'none';
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://662262]
Approved by ikegami
Front-paged by McDarren
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (7)
As of 2014-12-26 10:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (171 votes), past polls