Re: Accessing hash
- From: jeevan.ingale@xxxxxxxxx (Jeevs)
- Date: 28 May 2007 04:41:42 -0700
On May 28, 11:35 am, jeevan.ing...@xxxxxxxxx (Jeevs) wrote:
@hashi = @hash{qw (jeevan, sarika)};
print @hashi;
this gives me the values of keys jeevan and sarika.. how does this
work ...
ok i got it ...
and
I think i was not clear in my query...
I was expecting an hash slice to be
%hash{qw(jeevan sarika)} which seems more logical as i said earlier...
WEll i was browsing for more information and found out it has been
taken care of in perl6 :)
where a new operator (qoute word) is introduced <> instead of qw() in
perl5.
u can write the above hash as
@hashi = %hash<jeevan sarika>;
print @hashi;
and u can get the same output as above...
.
- Follow-Ups:
- Re: Accessing hash
- From: Brad Baxter
- Re: Accessing hash
- References:
- Accessing hash
- From: Jeevs
- Accessing hash
- Prev by Date: Re: Accessing hash
- Next by Date: Re: accesing a hash of an array of hashes
- Previous by thread: Accessing hash
- Next by thread: Re: Accessing hash
- Index(es):