Here's a solution that short circuits as soon as the comparison is larger than n:
perl -ape
'$_="match\n";$i=1;while($i<@F){((abs($F[$i]-$F[$i-1])||@F)>[EMAIL
PROTECTED])&&($_="not
a $_")&&([EMAIL PROTECTED]);$i++}'
Not as elegant as the others perhaps ...
/*
PLUG: http://plug.org, #utah on irc.freenode.net
Unsubscribe: http://plug.org/mailman/options/plug
Don't fear the penguin.
*/
