Date: Tue, 03 Jul 2001 12:38:02 -0700
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: Finding the subscript of an item in an array...
Message-Id: <3B421F1A.8DBEFD5E@vpservices.com>

Weston Cann wrote:
> 
> I know that you can find the subscript of an item in an array 
> ...
> I'm wondering if there's a neat-o
> perl idiom/single line kind of way to do the same thing.

@keys = qw(Travis Bonnie Flipper Arnold Deluxe);
@array_index{@keys}=(0..$#keys);
print $array_index{Flipper};

-- 
Jeff Zucker



