Re: How do I find the key of a specific hash element?
[email protected] (Gunnar Hjalmarsson)
| Newsgroups | perl.beginners |
|---|---|
| Message-ID | <[email protected]> |
Rob Dixon wrote:
> Dr.Ruud wrote:
>>
>> perl -le'
>> #!/usr/bin/perl
>> use strict;
>> use warnings;
>>
>> my @n2d = qw( SUN MON TUE WED THU FRI SAT );
>> my %d2n; @d2n{ @n2d } = ( 0 .. $#n2d );
>>
>> print $d2n{ WED };
>> '
>> 3
>
> It doesn't help to write UNIX shell commands when we are talking about a
> cross-platform language. Please stop.
What do you mean by that??
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl