Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Changing a number to a string

by CiceroLove (Monk)
on Jan 26, 2001 at 01:40 UTC ( #54370=note: print w/replies, xml ) Need Help??


in reply to Changing a number to a string

Easiest thing I do is just:
$foo = 0 . "";
This makes Perl kick in with the Right Thing. In converse, you can also
$foo = "2345" + 0;

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2021-06-22 03:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What does the "s" stand for in "perls"? (Whence perls)












    Results (100 votes). Check out past polls.

    Notices?