John Doe [JD], on Friday, May 6, 2005 at 10:10 (+0200) thinks about:

JD> Another solution (beside Xavier's one) with no need to know the number of
JD> elements:

JD> my $i=0; # or even: my $i;
my %hash=map {$_ => ++$i} qw /one two three four/;

yes, I thought about this one too, but Xaviers one is ok for me in this
situation. Thanks guys! Works like charm :)

--

How do you protect mail on web? I use http://www.2pu.net

["We cater to the occasional fetishes." - Janette]



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to