Tutorials Point


  Perl Home

  PERL Functions

© 2011 TutorialsPoint.COM


  Home     References     About TP     Advertising  

PERL ord Function



Syntax

ord EXPR

ord


Definition and Usage

Returns the ASCII numeric value of the character specified by EXPR, or $_ if omitted. For example, ord('A') returns a value of 65.

Return Value

  • Integer

Example

Try out following example:

#!/usr/bin/perl -w

print("ord() ", ord('G'), "\n");

It will produce following results:

ord() 71


Printer Friendly



  

Advertisement

Online Image Processing

Indian Baby Names