in reply to Re: Infinite loop regex
in thread Infinite loop regex

TIMTOWTDI... I would use a foreach loop instead of while. foreach will build the list before the loop runs then iterate, so once the list is finished the loop will exit. One call to the subroutine, no temporary variables, ie:

foreach ($response->content =~ /pcd=BT(\d+)/g) { print $count++,$1,"\n"; }