in reply to Regex negative word

If you want to find strings that don't match a pattern, you can use the negating binding operator !~. It's nicer looking than complex patterns.

if( $string !~ m/^cat/ ) { ... }
--
brian d foy <brian@stonehenge.com>
Subscribe to The Perl Review