in reply to Reg-Ex, range, and Exists...

Maybe something like

if (m/<span class="([^"]+)"/i && defined($hash{$1}) { print; }
this is untested, though

regards,
tomte


Update: I guess BrowserUK is right, so please reread the post with s/defined/exists/ :-)

Replies are listed 'Best First'.
Re: Re: Reg-Ex, range, and Exists...
by BrowserUk (Patriarch) on Mar 12, 2003 at 16:43 UTC

    Maybe exists would be better than defined in this instance?


    Examine what is said, not who speaks.
    1) When a distinguished but elderly scientist states that something is possible, he is almost certainly right. When he states that something is impossible, he is very probably wrong.
    2) The only way of discovering the limits of the possible is to venture a little way past them into the impossible
    3) Any sufficiently advanced technology is indistinguishable from magic.
    Arthur C. Clarke.
Re: Re: Reg-Ex, range, and Exists...
by zby (Vicar) on Mar 12, 2003 at 18:33 UTC
    For me it seems that he rather want the expression to match when there is a value from the hash in the line rather than a key.