develooper Front page | perl.beginners | Postings from March 2002

Re: Testing for filehandles

Thread Previous | Thread Next
From:
eric-perl
Date:
March 27, 2002 13:51
Subject:
Re: Testing for filehandles
Message ID:
Pine.LNX.4.33.0203271243460.20427-100000@lucy
On Wed, 27 Mar 2002, Agustin Rivera wrote:
> How would that work with use strict;? I tried it once and when I declared my
> $opt_n before using getopts, it wouldn't work.

Agustin:

From the Getopt::Std man page:

       Note that, if your code is running under the recommended
       `use strict 'vars'' pragma, you will need to declare these
       package variables with "our":

           our($opt_foo, $opt_bar);

-- 
Eric P.
Los Gatos, CA


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About