#!/usr/bin/perl -w
#
#
#
use strict;
use Getopt::Std;
our $opt_v;
getopts('v');
sub VERBOSE { $opt_v; }
This will fail:
$ ./try.pl
Use of reserved word "our" is deprecated at ./try.pl line 8.
Global symbol "$opt_v" requires explicit package name at ./try.pl line 8.
Execution of ./try.pl aborted due to compilation errors.
You can use this instead:
#!/usr/bin/perl -w
#
#
#
use strict;
use Getopt::Std;
use vars '$opt_v';
getopts('v');
sub VERBOSE { $opt_v; }
There is a discussion on what the error means at http://www.perlmonks.org/?node_id=23916