$local_ip_match starts by the character m, so it will try to match something that contains an m. That's probably not what you want.
The m in m/REGEX/ is an operator, so it should not be inside the string. You can try:
$s =~ m/^192\.168\.|^10\.|^127\.0\.|^172\.16\./
or if you want to store the regex in a variable:
$local_ip_match = qr/^192\.168\.|^10\.|^127\.0\.|^172\.16\./; see qr
Who's genex?
In reply to Re: I THOUGHT I'd finally understood genex
by Eily
in thread I THOUGHT I'd finally understood regex
by JEDtoo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |