Yes, but... The only case where it would yeild a wrong answer is when $n == 2. So just check for that.
if ((max( @$copy[ 0 .. ( $copy->[0] - 1 ) ] ) != $copy->[0] && min( @$copy[ ( $copy->[-1] - 1 ) .. $#$copy ] ) != $copy->[-1]) || @$copy == 2 ) {
Or am I missing something?
In reply to Re^3: Speed/Efficiency tweaks for a fannkuch benchmark script?
by thundergnat
in thread Speed/Efficiency tweaks for a fannkuch benchmark script?
by thundergnat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |