in reply to Re: u+ fails to force scalar context to empty list assignment: +( () = ... )
in thread u+ fails to force scalar context to empty list assignment: +( () = ... )
Shorter alternative:
>perl -MO=Concise,-exec -e"$a = +f()" 2>&1 | find "entersub" 5 <1> entersub[t3] sKS/TARG >perl -MO=Concise,-exec -e"@a = +f()" 2>&1 | find "entersub" 6 <1> entersub[t4] lKS/TARG >perl -MO=Concise,-exec -e"+f()" 2>&1 | find "entersub" 5 <1> entersub[t2] vKS/TARG
The first letter of the "word" after the op name (entersub) is the context in which it's evaluated.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: u+ fails to force scalar context to empty list assignment: +( () = ... )
by LanX (Saint) on Mar 12, 2019 at 02:32 UTC | |
by ikegami (Patriarch) on Mar 12, 2019 at 06:16 UTC | |
by LanX (Saint) on Mar 12, 2019 at 08:16 UTC |