develooper Front page | perl.beginners | Postings from May 2007

acccesing an hash

Thread Next
May 28, 2007 04:02
acccesing an hash
Message ID:
my %hash = (jeevan=>'Ingale', Sarika =>'Bere');
my @star = @hash{jeevan, Sarika};
print @star;

this prints ingale and bere but when i write

my %hash = (jeevan=>'Ingake', Sarika =>'Bere');
my @star = %hash{jeevan, Sarika};
print @star;

its an error..

Can someone explain or atleast point me to any document explainng what
exactly happens heres...

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About