in reply to Extract chunked/gzip data from pcap file
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Extract chunked/gzip data from pcap file (OT: Regex Usage)
by ikegami (Patriarch) on Dec 28, 2009 at 15:27 UTC | |
by oakb (Scribe) on Jan 04, 2010 at 16:04 UTC |