Perl is very flexible with its conversions between numbers and text so there aren't any conversions to ASCII needed:
my $x = 0b01001001;
my $hi = ($x & 0b11110000) >> 4;
$hi = $hi . " (four)";
print "The answer was $hi";
#The answer was 4 (four)
As far as a book recommendation goes, I learnt Perl mostly from The Perl Cookbook. A great book if you have some experience of other languages.
Perl comes with a huge amount of help for learning Perl. If you're running Activestate Perl, you should have all the documentation in html format already installed. Have a poke around in the Start menu. Of course, PerlMonks has a wealth of information too. Have a look in the tutorials section.
If you're going to spend any time here at PM, I think you should read Writeup Formatting Tips ;) |