Dale <mailto:[EMAIL PROTECTED]> wrote: : Hi Jeff 'japhy' Pinyan, you wrote: : : : if ($line =~ /^[\s\d]+$/) { ... } : : Can I just check something here Jeff. I thought the ^ symbol was for : "not equal", so why does this work when I'm looking for digits?
A circumflex (^) means "not" inside a character class. [a-c] and [^a-c] are character classes. The first represents characters a, b, or c and the second represents all characters which are not a, b, or c. In a regular expression, a circumflex (^) is used as an anchor for the beginning of the string being matched. The end of the string anchor is "$". So $line above, must begin (^) with either \s or \d ([\s\d]) and continue (+) to the end ($) of the line. HTH, Charles K. Clarkson -- Mobile Homes Specialist 254 968-8328 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>