in reply to Re: Getopt::Std dies or returns empty var
in thread Getopt::Std dies or returns empty var

Interesting. This works. I found some docs saying you had to use 'our' earlier, but the first time I tried running it 5.00503, it bitched about it being deprecated. Just ran it on 5.8 though and it worked. I'd assumed that if an earlier version barfed it, the newer one must be deprecated. This sucks too, cause the system I need it to run on can't really be upgraded :S

toeslikefingers.com - because you've got too much time on your hands
  • Comment on Re: Re: Getopt::Std dies or returns empty var

Replies are listed 'Best First'.
Re:x3 Getopt::Std dies or returns empty var
by grinder (Bishop) on Mar 11, 2004 at 13:50 UTC
    the system I need it to run on can't really be upgraded

    In that case, rather than declaring the variable with our $opt_u you should (must) declare a package variable with use vars qw/$opt_u/.

    Compatibility with older Perl interpreters is the main reason why I don't use our in my code.