in reply to Re: Re: counter issues
in thread counter issues
But the foreach loop is much easier to read, so unless it was absolutely necessary I'd stick with that one.my $i = 0; while($i++ < $#array) { ($x1, $y1) = ($array[$i] =~ m/\D(\D?\d+\D?\d*)\D(\D?\d+\D?\d*)\D/; ($x2, $y2) = ($array[$i + 1] =~ m/\D(\D?\d+\D?\d*)\D(\D?\d+\D?\d*) +\s*\D/); }
Makeshifts last the longest.
|
|---|