Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: 1 vs "1"

by davorg (Chancellor)
on Sep 12, 2001 at 18:52 UTC ( #111921=note: print w/replies, xml ) Need Help??


in reply to 1 vs "1"

You can't. Perl scalars can be used both as numbers and strings. Perl converts between the two internally and seamlessly.

Actually, that's not completely true. You might be able to do some deep XS magic to find out whether the string slot or the number slot in the SV has been used, but I'm guessing that you don't really want to go there :)

--
<http://www.dave.org.uk>

Perl Training in the UK <http://www.iterative-software.com>

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2022-08-10 11:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?