Front page | perl.perl6.language |
Postings from August 2005
Re: $pair[0]?
Thread Previous
|
Thread Next
From:
Andrew Shitov
Date:
August 4, 2005 15:24
Subject:
Re: $pair[0]?
> say $pair[0]; # a?
It looks like $pair is an arrayref while 'say ref $pair' tells 'Pair'.
And may I ask a relating question:
my $pair = ('name' => 'age');
say $pair{'name'}; # prints 'age'
say $pair['name']; # why prints 'name'? <== question
say $pair['age']; # prints 'name'
--
___________________________________________________________________________
Andrew, andy@shitov.ru
___________________________________________________________________________
Thread Previous
|
Thread Next