in reply to Obtaining perl's version from script

I made a little modification to your s///, and it works now:
s/./ord($&)/eg;