Help for this page

Select Code to Download


  1. or download this
    "Getopt::Auto" is happy for you to use "long" ("--gnu-style"), "short"
    ("-oldstyle") or even "bare" command names, ("myprogram edit foo.txt",
    ...
      $main::options{v} = 1
      $main::options{t} = 1
      edit("-x", "foo.txt");
    
  2. or download this
    #!/usr/bin/perl
    
    ...
        print "$_ : $main::options{$_}\n";
      }
    }
    
  3. or download this
    [alex@foo dev]$ perl -w go.pl -vt edit -x foo.txt
    Dump arguments!!
    Use of uninitialized value in subroutine entry at /usr/lib/perl5/site_
    +perl/5.8.0/Getopt/Auto.pm line 140.
    Can't use string ("") as a subroutine ref while "strict refs" in use a
    +t /usr/lib/perl5/site_perl/5.8.0/Getopt/Auto.pm line 140.
    END failed--call queue aborted.