Why does perl code always remind me of explitives?
On 11/2/06, Alan Young <[EMAIL PROTECTED]> wrote:
Paul Seamons wrote:
> PS - unmaintainable solution in perl
> perl -ne 'chop;@a=split;$n=grep{$t=abs($a[$_]-$a[$_-1]);!$t||$t>[EMAIL
PROTECTED]
> $#a;print$n?"not a ":"","match\n"'
I wasn't going to do this but you got me thinking:
perl -ape '$_=((grep{(abs($F[$_]-$F[$_-1])||@F+1)>@F}1..$#F)?"not a
":"")."match\n"'
Am I missing something obvious (or even not so obvious)?
/*
PLUG: http://plug.org, #utah on irc.freenode.net
Unsubscribe: http://plug.org/mailman/options/plug
Don't fear the penguin.
*/
/*
PLUG: http://plug.org, #utah on irc.freenode.net
Unsubscribe: http://plug.org/mailman/options/plug
Don't fear the penguin.
*/