just my two cents :)#!perl use strict; sub iA{join('',map{$_ if($_[0]eq$_[$_])}(1..$#_))-1} my(@array) = qw(foo bar crap stuff); print "$_: ".iA($_,@array),"\n" for(qw(foo dolsman crap));
/****************************/ jason@gost.net, wh@ckz.org http://jason.gost.net /*****************************/
In reply to Re: Shortest -return index of element in array- sub
by lindex
in thread Shortest -return index of element in array- sub
by leons
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |