in reply to encryption using Twofish

As long as encrypt() returns binary data, you'll have to encode it in some text reperesentation in order to be able to copy-paste it. Try MIME::Base64.

Alternatively, write the contents of this variable to a file (possibly opened in binary mode, see binmode).

Sorry if my advice was wrong.