On Tue Dec 13 08:54:22 2011, sprout wrote: > On Mon Dec 05 13:43:02 2011, sprout wrote: > > On Tue Mar 09 11:42:01 2004, perl5-porters@ton.iguana.be wrote: > > > In article <20040309154526.GB3952@e_n.org>, > > > Yitzchak Scott-Thoennes <sthoenna@efn.org> writes: > > > > Not trying to argue that it's not a bug; but you can say: > > > > > > > > process(scalar substr($a, 1, 3)); > > > > > > > > to prevent this. Should this be documented? Why does it work? > > > > > > It wouldn't "consume" the substr anymore, which supposedly was > > > the point of "process". > > > > > > I could argue this is a bug in "scalar" in fact... > > > > Several others have argued the same thing in this ticket. Attached is a > > patch to fix it. It also allows (foo(), scalar bar())=@list for lvalue > > subroutines, which I think is good. But it allows scalar($foo)=3, but > > not scalar(@foo)=3. Do we want this? I think it is harmless and makes > > scalar() consistent with the implicit scalar() provided by the ($) > > prototype. > > > > I’ve now applied it as d408447. > And reverted it as 41b1a11c4. See ticket #106288 for details. -- Father Chrysostomos