Hello Mr. Poe & All,
Thank you very much for your articulate & thorough answers. I'm sure
you've enlightened others as well with your response.
I'm a Site Designer turning Perl Hacker over the last 5-6 months &
I'm just concerned about being dangerous in the transition. IMO It's
better that I as
--- "K.L. Hayes" <[EMAIL PROTECTED]> wrote:
> Hello Jonathan & All,
>
> Thank you for taking the time to answer. I "thought" that the $1 was
> locally scoped but didn't want to "assume" it. Better not to assume
> things with Perl has been my experience.
See my previous reply to your question. $
--- "K.L. Hayes" <[EMAIL PROTECTED]> wrote:
> 17: if ( $tainted_username =~ /^([a-zA-Z\d_]+)$/ )
> 18: {
> 19: $username = $1;
> 20: }
> 21: else
> 22: {
> 23: display_page( $message );
> 24: exit;
> 25: }
>
> OK... The questions...
>
> 1. Why doesn't "use strict" complain a
Hello Jonathan & All,
Thank you for taking the time to answer. I "thought" that the $1 was
locally scoped but didn't want to "assume" it. Better not to assume
things with Perl has been my experience.
I don't fully understand the trinary operator. However I'll research
this tonight.
My main conc
> 1. Why doesn't "use strict" complain about the $1 not
> being declared?
$1, $2 etc are locally scoped variables which come from the
regex. A regex like:
m/(..)(.*)/
will place the first two characters into $1, and the rest
into $2 - according to the parathesis.
> 2. How can I filter ALL of
Hello All,
I was looking over the lesson posted by Curtis Poe & have questions I
hope somebody (maybe Mr. Poe?) can help with.
The lesson is posted here:
http://www.easystreet.com/~ovid/cgi_course/lesson_four/lesson_four_2.html
The code in question is this piece here:
17: if ( $tainted_userna