RE: aliasing - was:[nice2haveit]

2001-07-19 Thread Sterin, Ilya
Agree. I think that with() should only be used with object references only, and $_ should be set accordingly. Ilya -Original Message- From: John Porter To: [EMAIL PROTECTED] Sent: 07/19/2001 1:01 PM Subject: Re: aliasing - was:[nice2haveit] Sterin, Ilya wrote: But I thought

Re: aliasing - was:[nice2haveit]

2001-07-19 Thread John Porter
Bart Lateur wrote: So, in this case, a with synonym for for would work. But this only works for scalars. You can't have a %foo alias to %Some::Other::hash this way, or a @bar alias to @Some::Other::array. Sounds like what we really want is a form of for which can iterate over a list of

Re: aliasing - was:[nice2haveit]

2001-07-19 Thread Me
Sounds like what we really want is a form of for which can iterate over a list of hashes or arrays: for my @a ( @foo, @bar ) { ... for my %h ( %foo, %bar ) { ... Yes. Isn't the underlying issue in the above how perl6 handles manipulation and aliasing of multi-dimensional arrays into

RE: aliasing - was:[nice2haveit]

2001-07-19 Thread Sterin, Ilya
/19/2001 11:31 AM Subject: Re: aliasing - was:[nice2haveit] Then how would you write I am not a coward with ($foo) { print I am not a; ##What do I use here or do I have to issue a ##separate print like... print; } Ilya Well in Perl5, for the print to use default

RE: aliasing - was:[nice2haveit]

2001-07-19 Thread Sterin, Ilya
Stuart Rocks wrote: CWith would also make the [variable, alias, whatever] default, but not replace the $_: $_ = monkey ; $foo = coward; with ($foo){ print; print $_; } would output monkey coward. okay, coward is default but $_ has not been replaced, so would not the

Re: aliasing - was:[nice2haveit]

2001-07-19 Thread John Porter
Sterin, Ilya wrote: But I thought this was related to more than just with(), so if we have ### Would now have to be printed as print This is number ; print; print of 10\n; I still believe that although not defining a variable source will use the temp variable there is still a need