Do you know where your variables are? | |
PerlMonks |
Re^2: Hex Question(s)by TGI (Parson) |
on Mar 27, 2008 at 16:51 UTC ( [id://676795]=note: print w/replies, xml ) | Need Help?? |
What version of Perl are you using? When I run your code on my system (WinXP, ActivePerl 5.8.8), I get an incorrect answer. I added a the use warnings pragma to your code and got this result:
You can specify hexadecimals in literal code by appending an '0x' to the value. I suppose, if you really wanted to get to a hexadecimal from a string, you could use string eval.
I'd be inclined to go with hex, though.
In Section
Seekers of Perl Wisdom
|
|