At 12:30 PM 1/2/00 -0800, Yitzchak Scott-Thoennes wrote: >In article <4.2.2.20000102111820.00a2b3d0@mail.psdt.com>, >Peter Scott <Peter@PSDT.com> wrote: > >And so the above can be written as > > > > @a = @a ? @a : (1, 2); > > > >which doesn't have any problem evaluating @a in multiple contexts. > >How about: >{ my $var = 'aaa'; sub newvarname() {$var++} } >@{+newvarname} = 'hi'; >@{+newvarname} = 'there'; >print "@aaa @aab"; > >Should you be able to just replace the = with an ||= and have it work? I don't see that being any more of a problem with ||= than with any other <op>=. > >It's merely a question of what would break if || propagated context as well. > >|| does propagate context...to the right hand side. Sorry, I meant to say left-hand side. Don't take this to mean that I'm jumping up and down yelling for someone to make context propagate down the left-hand side of ||... I just want to know what the resolution is/was. -- Peter Scott Pacific Systems Design Technologies ==== Want to unsubscribe from Fun With Perl? Well, if you insist... ==== Send email to <fwp-request@technofile.org> with message _body_ ==== unsubscribe