Convert a number with the hex() or oct() : oct « Data Type « Perl






Convert a number with the hex() or oct()

   
#!/usr/bin/perl
use warnings;
print hex("0x30"), "\n";
print oct("030"), "\n";

   
    
    
  








Related examples in the same category

1.Illegal octal number: with 8 inside
2.Octal number
3.Octal numerals starting with 0x
4.Using oct function to convert number to octal numbers
5.oct("178")
6.octal data
7.Reads any kind of integer.