in reply to Extracting IP address from large text file.
while (/(yourregexhere)/g) { print $1; } [download]
See also: perlretut