Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: checking $option

by citromatik (Curate)
on Jun 26, 2009 at 07:38 UTC ( #774950=note: print w/replies, xml ) Need Help??


in reply to question about getopt

If you are using a Perl version >= 5.10 you can also use the // operator (see perlop):

my $source_file = $options{o} // 'as.xcf-dist'; my $config_file = $options{c} // 'config.ini'; my $dest_file = $options{x} // usage();

citromatik

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2023-12-03 11:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?











    Results (20 votes). Check out past polls.

    Notices?