# PERL Question

**URL:** https://boards.straightdope.com/t/perl-question/544857
**Category:** Factual Questions
**Created:** [June 28, 2010, 10:55pm UTC](https://boards.straightdope.com/t/perl-question/544857 "2010-06-28T22:55:32Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Fiddle\_Peghead](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/fiddle_peghead/32/3506_2.png) [@Fiddle\_Peghead](https://boards.straightdope.com/u/Fiddle_Peghead)
#### Post date: [June 28, 2010, 10:55pm UTC](https://boards.straightdope.com/t/perl-question/544857/1 "2010-06-28T22:55:32Z")

</div>

What does this do?

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

---

<div class="post-metadata">

### Author: ![Manduck](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/manduck/32/256_2.png) [@Manduck](https://boards.straightdope.com/u/Manduck)
#### Post date: [June 28, 2010, 11:00pm UTC](https://boards.straightdope.com/t/perl-question/544857/2 "2010-06-28T23:00:49Z")

</div>

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

---

<div class="post-metadata">

### Author: ![friedo](https://avatars.discourse-cdn.com/v4/letter/f/8edcca/32.png) [@friedo](https://boards.straightdope.com/u/friedo)
#### Post date: [June 28, 2010, 11:30pm UTC](https://boards.straightdope.com/t/perl-question/544857/3 "2010-06-28T23:30:02Z")

</div>

What **Manduck** said. For further reference, see [Binding Operators](http://perldoc.perl.org/perlop.html#Binding-Operators) in the perlop manpage for how =~ (and its negation !~) works. And see [Modifiers](http://perldoc.perl.org/perlre.html#Modifiers) in perlre for the list of flags that you can stick on a regex.

---

<div class="post-metadata">

### Author: ![Derleth](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@Derleth](https://boards.straightdope.com/u/Derleth)
#### Post date: [June 28, 2010, 11:49pm UTC](https://boards.straightdope.com/t/perl-question/544857/4 "2010-06-28T23:49:53Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Superfluous\_Parentheses](https://avatars.discourse-cdn.com/v4/letter/s/8edcca/32.png) [@Superfluous\_Parentheses](https://boards.straightdope.com/u/Superfluous_Parentheses)
#### Post date: [June 29, 2010, 1:56pm UTC](https://boards.straightdope.com/t/perl-question/544857/5 "2010-06-29T13:56:41Z")

</div>

> [@Derleth](#):
>
> 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.
