in reply to Re: Re: Re: How does ~~ force string interpolation of code into scalar context?
in thread How does ~~ force string interpolation of code into scalar context?

Far better indeed, as your "undecorated print statements" don't interpolate the function f1, f2 and f3; they just print the literal text f1( ... ).

The "decorative" version executes f1() with $arg1 as its parameter.

Of course neither approach is better than print "@{[f1( $arg1 )]}";, and that method is, itself, usually worse than print f1( $arg1 ); (without unnecessary interpolation).


Dave


"If I had my life to live over again, I'd be a plumber." -- Albert Einstein