Note that in a statement like
if ($data =~ /some text/g) { ... }
the /g regex modifier does nothing Update: See ikegami's correction. In boolean context, you only care if the pattern matched or did not match. Given the regex of the example, you cannot distinguish if the regex matched once or more than once (although a different regex could determine this).
See g in the Modifiers section of perlre.
In reply to Re: Extract chunked/gzip data from pcap file (OT: Regex Usage)
by AnomalousMonk
in thread Extract chunked/gzip data from pcap file
by oakb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |