Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    GetOptions("foo=s"=>\$foo);
    
    print "The foo parameter is '$foo'\n";
    
  2. or download this
    $ perl foo.pl
    The foo parameter is 'default'
    ...
    $ perl foo.pl -foo=BARBAZ
    The foo parameter is 'BARBAZ'
    $