Help for this page

Select Code to Download


  1. or download this
    use Getopt::Long (); 
    
    ...
    
    print("\$opt_float = ", defined($opt_float) ? $opt_float : "[undef]", 
    +"\n");
    print("\@ARGV      = ", join(' ', @ARGV), "\n");
    
  2. or download this
    >perl 551404.pl -float 1.3
    $opt_float = 1.3
    ...
    >perl 551404.pl -float abc
    Value "abc" invalid for option float (real number expected)
    Bad args