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";