in reply to convert hex string to hex number
Disclaimer: I know nothing about any perl Gtk modules!
There isn't such a thing as a "hex number" in Perl. There are strings that are used to represent hex numbers and they can be converted to integers using oct or hex.
Is the following code any help?
my $hex = "0x3cb37180"; my $dec = oct $hex; say $dec; # 1018392960 say sprintf "0x%X", $dec; # 0x3CB37180
Since you didn't say which module you're using I couldn't check it's documentation to check what $rect->set is expecting
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: convert hex string to hex number
by grantm (Parson) on Jul 02, 2008 at 23:19 UTC | |
by shmem (Chancellor) on Jul 03, 2008 at 11:23 UTC | |
|
Re^2: convert hex string to hex number
by Anonymous Monk on Jan 04, 2012 at 14:07 UTC |