Browse - Programming Tips - Is there a shorthand for a non-match?

Date: 2014jul8
Language: Perl

Q.  Is there a shorthand for a non-match?

A.  Yes, use !~

Ugly way:

if (!($filename =~ m/\.ini$/)) { print "non an ini file\n"; }
More compact way:
if ($filename !~ m/\.ini$/) { print "non an ini file\n"; }