If you want an integer from a hex number constant, it's $num = 0x1234ABCD; don't put quotes around it or you have a string instead of a number. If you have a VB-style hex constant as a string, you might need to do a little conversion:
$foo = '&H3A16001E'; $foo =~ s/ \&H / 0x /x; $num = eval $foo;
--
[ e d @ h a l l e y . c c ]
In reply to Re: From VB to Perl
by halley
in thread From VB to Perl
by ChrisR
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |