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

when multidim emulation works

Thread Next
david nicol
May 11, 2003 20:13
when multidim emulation works
Message ID:

Is this a bug?

% perl -le '$e{(0,1,2,3)} = 3; @a=(0,1,2,3); print $e{@q=@a}'

% perl -le '$e{(0,1,2,3)} = 3; @a=(0,1,2,3); print $e{@a}'

% perl -le '$e{(0,1,2,3)} = 3; @a=(0,1,2,3); print $e{0,@a[1,2,3]}'
% perl -le '$e{(0,1,2,3)} = 3; @a=(0,1,2,3); print $e{$a[0],@a[1,2,3]}'

Well it is, because it isn't DWIM; but the question is, is
$e{@a} supposed to interpolate $; or not?  I want it to and
it doesn't seem to.

David Nicol, independent consultant and contractor
have a nice day, really. 

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