in reply to Encryption or Search and Replace?

Grab a copy of Convert::EBCDIC and look at the way it implements the ASCII to EBCDIC translation tables. That will probably give you a couple good ideas.