On Sat, May 21, 2005 at 12:11:42AM -0400, Chris Devers wrote: > On Fri, 20 May 2005, Peter Rabbitson wrote: > > > my @lsit = qw(a b c d); > > my %indexes; > > > > my $current_index = 0; > > > > foreach my $element (@list) { > > $indexes{$element} = $current_index; > > ++ $current_index; > > } > > Ah. Maybe this? > > for (0 .. $#list) { > $indexes{$list[$_]} = $_; > } > > Closer? >
Kinda... although it doesn't answer my initial question about the internal variable :) Thanks though. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>