> my $rounding = 0.01;
> 
> GetOptions(
>       'round=f' => \$rounding,
>       'help'       => sub {usage()},
>       );
> 
> sub usage {
>       print "usage:  $0 <filename>\n";
>       print "options:  --round <float>   (default  $rounding)\n";
> }
> END

This will have a nasty side effect, as shown below:

  $ round --help
  usage:  round <filename>
  options:  --round <float>   (default  0.01)
  $ round --round=42 --help
  usage:  round <filename>
  options:  --round <float>   (default  42)

-- Johan

Reply via email to