in reply to decode a file
perldoc MIME::Base64 gives some examples that might look familiar (to you or the original programmer). You can decode the slurped file or decode by chunks. It's very simple.