develooper Front page | perl.perl5.porters | Postings from May 2003

Re: docpatch concerning multidim emulation

Thread Previous | Thread Next
From:
Mark Jason Dominus
Date:
May 24, 2003 09:39
Subject:
Re: docpatch concerning multidim emulation
Message ID:
20030524163924.1503.qmail@plover.com

> > +syntactly force an array of subsripts into the list required to trigger
> > +multidimensional emulation, include an empty list into your list, like
> > +
> > +    @subscripts=($a,$b,$c);
> > +    ...
> > +    $foo{(),@subscripts}
> > +

When I've needed to do this in my code, I've just gone with

        $foo{join $;, @subscripts}

which isn't much longer, but which is much more obvious.  Perhaps we
should be documenting the explicit 'join' solution instead of the ()
trick.


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About