Tutorials Point


  Perl Home

  PERL Functions

© 2011 TutorialsPoint.COM


  Home     References     About TP     Advertising  

PERL hex Function



Syntax

hex EXPR

hex


Definition and Usage

Interprets EXPR as a hexadecimal string and returns the value, or converts $_ if EXPR is omitted.

Return Value

  • In scalar context - Numeric value equivalent to hexa.

Example

Try out following example:

#!/usr/bin/perl

print hex '0xAf'; # prints '175'
print "\n";
print hex 'aF';   # same



Printer Friendly



  

Advertisement

Online Image Processing

Indian Baby Names