in reply to Re^2: negative regex without !~
in thread negative regex without !~

Works in 5.005

but who's still using 5.0 these days?

<sheepishly> Me. Some companies haven't upgraded.... </sheepishly>

use strict; print 'Perl version is: ', $]; my @foo = qw/ fee fie fo fum big bag boz /; foreach ( @foo ) { if ( $_ !~ /f/ ) { print "Matched: $_ !~ /f/ " ; } else { print "Failed: $_ !~ /f/ " ; } } Output: Perl version is: 5.00503 Failed: fee !~ /f/ Failed: fie !~ /f/ Failed: fo !~ /f/ Failed: fum !~ /f/ Matched: big !~ /f/ Matched: bag !~ /f/ Matched: boz !~ /f/

-------------------------------------
Nothing is too wonderful to be true
-- Michael Faraday

Replies are listed 'Best First'.
Re^4: negative regex without !~
by jryan (Vicar) on Jul 23, 2004 at 00:31 UTC

    Perl version 5.00503 is essentially Perl 5.5.3; they changed the release version numbers starting with Perl 5.6.0