PERL Question

What does this do?

if ( $val !~ m/msa/i ) { … }

If $val does not contain the substring “msa”, where the comparison is case-insensitive.

What Manduck said. For further reference, see Binding Operators in the perlop manpage for how =~ (and its negation !~) works. And see Modifiers in perlre for the list of flags that you can stick on a regex.

If you have access to a good command line, and Perl is installed correctly on your system, typing ‘man perlop’ and getting to know perldoc will be very useful.

And “perldoc perlop” should work instead of “man perlop” on systems that don’t have man or are incorrectly configured.