[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

regex question



If I have the following:

    while (<DB>) {
	next unless (/(\d{8}).*serial/);
	$oldserial=$1;
	last;
    }

I would've thought this would find the serial number
in a DNS db file and return it as $1, then break out
of the loop.  It seems to break out of the loop and is
null.  I'm pretty fuzzy on regex and this way of
breaking out of a loop but I can't think of a better
way.  Does anybody see what I'm doing wrong?

__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/
-
To unsubscribe, send email to majordomo@luci.org with
"unsubscribe luci-discuss" in the body.