in reply to shift doesn't DWIM
Where would the line be drawn? Would using map in "void context" spew its return value into @_ ?
DWIMery shouldn't venture into the "Do What I Wish" if doing so creates serious language inconsistancies, IMHO.
My memory may be incomplete or in need of refreshing, but I can't think of any subs that populate $_ as a default lvalue. Yes, there is the diamond operator in the special case of a while() loop, there is foreach(), the m// and s/// operators, and there are subs that utilize $_ as a default parameter. But there aren't any subs I can think of that populate $_ as though it were an lvalue.
Dave
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: shift doesn't DWIM
by TimToady (Parson) on Jul 12, 2005 at 16:49 UTC | |
|
Re^2: shift doesn't DWIM
by itub (Priest) on Jul 12, 2005 at 11:26 UTC | |
|
Re^2: shift doesn't DWIM
by tlm (Prior) on Jul 12, 2005 at 10:14 UTC |