Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

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

by syphilis (Archbishop)
on Apr 05, 2024 at 08:28 UTC ( [id://11158690]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11158690]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2024-05-18 03:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found