Help for this page

Select Code to Download


  1. or download this
        getopt('oDI');    # -o, -D & -I take arg.  Sets $opt_* as a side e
    +ffect.
        getopt('oDI', \%opts);    # -o, -D & -I take arg.  Values in %opts
    
  2. or download this
    #!perl
    use Getopt::Std;
    ...
    for (keys %opts) {
        print '$opts{', $_, '} = "', $opts{$_}, "\"\n";
    }
    
  3. or download this
    
    C:\myperl\temp>perl temp.pl -z
    ...
    
    C:\myperl\temp>temp -z -z
    $opts{z} = "-z"