in reply to Shortest -return index of element in array- sub
this works:
lindex
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 Section
Cool Uses for Perl