Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Hex, Localtime and strings

by Fletch (Chancellor)
on Sep 26, 2012 at 17:18 UTC ( #995831=note: print w/ replies, xml ) Need Help??


in reply to Hex, Localtime and strings

Because the former is a numeric literal where the 0x prefix means something; the later is a string treated as a number which presumes base10 (which means it gives up when it sees a non-digit "x" and is numerically 0). You need to use oct to get the string value treated like it would be as a numeric literal.

The cake is a lie.
The cake is a lie.
The cake is a lie.


Comment on Re: Hex, Localtime and strings
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (15)
As of 2015-07-06 20:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (82 votes), past polls