You need to use /g:
while (/req=(\d+)/g) { print OUT ("$1\n"); } [download]
In reply to Re: pattern matching by ikegami in thread pattern matching by Anonymous Monk