--- Ronald J Kimball <[EMAIL PROTECTED]> wrote:
> On Mon, Mar 10, 2003 at 12:24:51AM +0000, Richard Smith wrote:
> > 91: {
> > 92: m/name\s*=\s*"*(\w+)"*/;
> > 93: $1 and $name = $1;
> > 94: }
>
> $1 et al. contain the values from the last *successfully matched* regular
> expression. Thus, if the regex on line 92 does not match, $1 will still
> have its value from line 65.
>
> I would suggest writing lines 92 and 93 like this:
>
> m/name\s*=\s*"?(\w+)"?/ and $name = $1;
>
>
> Ronald
Thank you Ronald, that works perfectly now. It never occured to me that m///
returns a true value if successful! I'm not quite sure _how_ I overlooked that
fact.
ATB,
Richard
=====
I'm not tense. I'm just terribly, terribly alert.
-----------------------------------------------------
Team Artonomy - Drawing Business
Cartoons and illustration for web sites and business.
http://www.team-artonomy.com/
-----------------------------------------------------
__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com