Jerrad Pierce wrote:
> In reply to your message from the not too distant future: next Tuesday AD
> Reply-to: [EMAIL PROTECTED]
> Return-receipt-to: [EMAIL PROTECTED]
> Organization: a) Discordia b) none c) what's that?
> Content-Typo: gibberish, charset=ascii-art
> Date: Tue, 22 Aug 2000 11:06:21 EDT
> From: Jerrad Pierce <belg4mit>
Please stop doing this.
And for God's sake get rid of that obnoxious .sig.
> Umm no.. for what I *want* to do is take the keys of the hash returned as a
> list by a block. That's what I want. And yes I can do it with %{{}}.
> But it's hardly symmetrical to working with arrays, and definitely not
> obvious. Especially to a newbie, and even to lightly seasoned veterans.
I think you are still confused as to the difference between arrays and
hashes, which are variables, and lists, which are not.
The assignment of lists to arrays and hashes are well-defined operations,
and quite transparent. Also feeding the confusion is that some array
operations also work on lists, such as scalar() and ()[]. But lists
are still not arrays; and certain array operations can ONLY work on
arrays, because they must work on variables, which lists are not.
Symmetrically, hash operations must work on hashes, which lists are not.
But I do agree it would be nice if there were a way to simultaneously
construct and dereference an anonymous array or list, perhaps something
like
@( 1, 2, 3 )
%( foo => 1, bar => 2 )
which would be equivalent to
@{[ 1, 2, 3 ]}
%{{ foo => 1, bar => 2 }}
but with perhaps lower overhead.
--
John Porter
We're building the house of the future together.