Damian Conway wrote:
> push @moves, [$i, $j];
> for 0..6 -> $t {
> if abs(@new[$t] - @new[$t+1]) > 3 {
> pop @moves;
> last;
> }
> }
>
>
Indeed, an elegant way around the problem.
So... lets call a function instead:
my $is_ok = 1;
for 0..6 -> $t {
if abs(@new[$t] - @new[$t+1]) > 3 {
$is_ok = 0;
last;
}
}
if $is_ok {
yada() # has sideeffects...
}
(wrote many such constructs for cgi sanity
checks and always found it mildly annoying)
regards
thomas
--
Imagination is more important than knowledge [Einstein]
begin 666 wink.gif
M1TE&.#EA#P`/`+,``````+^_O___````````````````````````````````
M`````````````````````"'Y! $```$`+ `````/``\```0T,$@):ITX5,'Y
MQ4 G>E,[EMAIL PROTECTED]>PI;C9:YZYGOQK?C12<R8C%7P;[EMAIL PROTECTED]
`
end