in reply to Does the experimental builtin::stringify() do anything that scalar() doesn't ?

Presumably, there are circumstances where builtin::stringify() and scalar() are not the same thing ....

I've finally found a difference, though I don't know if it's intended or accidental:
D:\>perl -wle "print scalar(10,20);" Useless use of a constant (10) in void context at -e line 1. 20 D:\>perl -Mexperimental=builtin -wle "print builtin::stringify(10,20); +" Too many arguments for builtin::stringify at -e line 1, near "20)" Execution of -e aborted due to compilation errors.
Cheers,
Rob
  • Comment on Re: Does the experimental builtin::stringify() do anything that scalar() doesn't ?
  • Download Code

Replies are listed 'Best First'.
Re^2: Does the experimental builtin::stringify() do anything that scalar() doesn't ?
by jdporter (Paladin) on Apr 05, 2024 at 13:51 UTC

    Well, the OP didn't really mean scalar, they meant "other means of forcing stringification", e.g. ''.$v.