in reply to use strict with Getopt::Std

With my you don't create a global, but a lexical. You want to
use vars qw/$opt_J ... and so on .../;
at the top of your program. This way, you'll tell your program that you're going to use those global variable names, and strict won't complain. I suggest to read Lexical scoping like a fox and Coping with Scoping. I think there will be a column by merlyn on this subject soon.

Replies are listed 'Best First'.
Re: Re: use strict with Getopt::Std
by cutter (Acolyte) on Mar 19, 2003 at 22:01 UTC
    Thanks for the hints. I am just learning perl and trying to get my mind wrapped around the concept of scoping. This is what happens when you give a polsci major a computer.