Re: hash slice from array items

13 views
Skip to first unread message

Carl Franks

unread,
May 25, 2005, 12:21:54 PM5/25/05
to perl6-language
On 5/25/05, Jonathan Scott Duff <du...@pobox.com> wrote:
> Works just fine for me. What version of pugs are you using? Perhaps
> you need to upgrade.

Ok, I've just realised I had missed a '->' to '.' in my perl5 to perl6
conversion,
I was trying to do
%hash{@array} = $obj->list;

I wasn't sure if slicing from an array was implemented, as I couldn't
find any pugs tests for it.

Thanks for your help,
Carl

Jonathan Scott Duff

unread,
May 25, 2005, 12:08:57 PM5/25/05
to ca...@fireartist.com, perl6-language
On Wed, May 25, 2005 at 05:00:39PM +0100, Carl Franks wrote:
> Is %hash{@array} the correct way to get a hash slice using elements of
> an array?

Yep.

> (it's giving me a compilation error with pugs)

Works just fine for me. What version of pugs are you using? Perhaps
you need to upgrade.

-Scott
--
Jonathan Scott Duff
du...@pobox.com

Carl Franks

unread,
May 25, 2005, 12:00:39 PM5/25/05
to perl6-language
Is %hash{@array} the correct way to get a hash slice using elements of an array?

(it's giving me a compilation error with pugs)

Cheers,
Carl

Reply all
Reply to author
Forward
0 new messages