in reply to Re: What does a plus mean before a package name?
in thread What does a plus mean before a package name?
Unary-"+" does not numify (or stringify). It's a no-op.
>perl -E"$_ = 'abc'; say +$_;" abc >perl -E"$_ = [qw( a b c )]; say @{ +$_ };" abc
It doesn't even influence context. Not even void!
>perl -E"sub f { say( ( (wantarray && 'list' ) // 'void' ) || 'scalar' + ); } +f(); $_=+f(); ()=+f();" void scalar list
What you said is the secondary effect is the only effect.
|
|---|