Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    
    use Getopt::Long;
    ...
    foreach $opt (keys %options) {
        print "$opt is $options{$opt}\n" if $options{$opt};
    }
    
  2. or download this
    nkuvu$ perl try.pl --i h --o=foo
    h is still in ARGV
    o is foo
    i is 1
    
  3. or download this
    GetOptions(
      #whatever
    );
    
    die "Gah! (with appropriate error message here)\n" if (@ARGV);