c:\@Work\Perl\monks>perl -wMstrict -le "for my $f ('xyz.pl', '.pl', 'abc.x', 'abc') { printf qq{%10s matches at position $-[0] \n}, qq{'$f'} if $f =~ m{ (?! [.]pl \z) }xms; } " 'xyz.pl' matches at position 0 '.pl' matches at position 1 'abc.x' matches at position 0 'abc' matches at position 0