If you use the /s modifier, then . matches any character, including newlines. So for example:
"a\nb" =~ m/a.*b/; # no match "a\nb" =~ m/a.*b/s; # matches
For handling TCP packets I'd rather use an existing module from CPAN.
In reply to Re: pattern matching
by moritz
in thread pattern matching
by hnd
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |