Well then maybe $_ can be a reference to a multidimensional array or hash,
and temp vars can be access like this.

for ( @foo, @bar ) {
print "$_->[0] : $_->[1]\n";
}

As for hashes it might hold the key, also in an multidimensional array.

Ilya

-----Original Message-----
From: John Porter
To: [EMAIL PROTECTED]
Sent: 07/19/2001 12:59 PM
Subject: Re: what's with 'with'?  (was: [aliasing - was:[nice2haveit]])

I believe what is really wanted is for "for" to be able to iterate
over lists of arrays or hashes:

        for my @i ( @foo, @bar ) { ...

        for my %i ( %foo, %bar ) { ...

with real aliasing occuring.

If @_ and %_ are the default iterator variables, then imagine:

        for ( @argset1, @argset2 ) {
                &quux;

But I'm not convinced of the utility of this over using
scalar references.

-- 
John Porter

Reply via email to