Ever wondered what the ascii code is for a certain character?

This little script will help you find out the code for any standard character on the fly:

use strict;
print "What character do you want to know the ascii code for?";
my $ascii = chomp( <STDIN> );
print "The ascii code for $ascii is: ", ord($ascii);

Leave a Reply