my $count; while($response->content =~ /pcd=BT(\d+)/g) { print $count++,$1,"\n"; } [download]
In reply to Infinite loop regex by Baz