update: and to avoid trying to index below 0: and suggesting an inequality function:$arr[ ($i - 4) .. $i ]
my $h = $i - 4; if ( $h >= 0 ) { if (unequal ( $arr[ $h .. $i ] ) { # flag stuck value } } # ... sub unequal { my %v = map { ($_, 1 ); } @_; my @v = keys %v; return $#v; }
One world, one people
In reply to Re^3: Stuck Value
by anonymized user 468275
in thread Stuck Value
by halligalli
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |