http://www.perlmonks.org?node_id=588337


in reply to Negating Regexes: Tips, Tools, And Tricks Of The Trade

I suppose
my $regexp = /something_here/; do_stuff() unless $foo =~ $regexp;
is cheating, eh? ;)

Replies are listed 'Best First'.
Re^2: Negating Regexes: Tips, Tools, And Tricks Of The Trade
by imp (Priest) on Dec 07, 2006 at 14:51 UTC
    That approach is valid, but not appropriate for this context because the regex in question is being passed to WWW::Mechanize as follows:
    $mech->find_all_links(text_regex => qr/download/i);