You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
223 B
Perl
11 lines
223 B
Perl
5 years ago
|
#An integer with a leading 0 is treated as an octal number.
|
||
|
#An integer with a leading 0x (or 0X) is a hexadecimal number.
|
||
|
|
||
|
#!/usr/bin/perl -w
|
||
|
|
||
|
$hex = 0xFF;
|
||
|
|
||
|
$octal = 010;
|
||
|
|
||
|
print "0xFF = $hex, 010 = $octal.\n";
|