Programming

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:

#!/usr/bin/perl
# ascii.pl
 
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);
 
exit(0);

Leave a Reply