itchybrownrobe has asked for the wisdom of the Perl Monks concerning the following question:
Below is the beginning of my script. I plan to use Time::Local but am not right now, so it is commented out and, I think, not a factor. What I have is a series of declarations followed by the regex stuff. Perhaps its not the most elegant way to do this, but I can not figure out why, since no loops, if-else clauses, or subroutines factor into this series of matches and assignments, the strict pragma does not like it. As I understand it, these variables are all file scope and should therefore be OK to 'strict'. If I turn strict on and then add 'no strict vars' the script will compile.
Thanks
itchybrownrobe
#use strict; use warnings; #use Time::Local; use CGI qw(:standard); use CGI::Carp qw(fatalsToBrowser); my $sec = 0; my $min; my $hours; my $D_title = param('title'); my $title; . . . #___________start_untainting_form_input_________ $temp = ($D_title =~ m/^(Dr.|Prof.|Mrs.|Ms.|Miss|Mr.)$/ ); $title = $1;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: compilation error with 'strict' pragma on
by Zaxo (Archbishop) on Jun 18, 2004 at 23:02 UTC | |
|
Re: compilation error with 'strict' pragma on
by tachyon (Chancellor) on Jun 19, 2004 at 00:01 UTC | |
|
Re: compilation error with 'strict' pragma on
by nightwatch (Scribe) on Jun 19, 2004 at 07:10 UTC |