Using the ord function to the get the ASCII code value : ord « String « Perl






Using the ord function to the get the ASCII code value

    

#!/usr/bin/perl -w

print "A # has ASCII value ", ord("#"), "\n";
print "A * has ASCII value ", ord("*"), "\n";

   
    
    
    
  








Related examples in the same category

1.print ord 'A';
2.print ord 'ABC';
3.find the character's value by using the ord() function