Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Re: Shortest -return index of element in array- sub

by arhuman (Vicar)
on Mar 21, 2001 at 19:10 UTC( #66032=note: print w/replies, xml ) Need Help??


in reply to Re: Shortest -return index of element in array- sub
in thread Shortest -return index of element in array- sub

sub indexArray(@) { 1 while $_[0] ne pop; $#_; }
Saves One char...
Could be applied to some of the other solutions (jmcnamara) too...


"Trying to be a SMART lamer" (thanx to Merlyn ;-)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://66032]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2016-08-30 00:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The best thing I ever won in a lottery was:















    Results (410 votes). Check out past polls.