If you don't need to know which type matched, useif ($string =~ m{(int|char|bool|long)}) { print "found $1\n"; }
This can be significantly faster, especially for big strings. Update: Thanks sundialsvc4 :).if ($string =~ m{(?:int|char|bool|long)}) { print "found\n"; }
In reply to Re: multiple options for pattern match help
by lima1
in thread multiple options for pattern match help
by barryscott
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |