If you need to be able to decrypt the the encrypted string back to to its original form you could just xor the string against a passphrase:
use strict;
use warnings;
my $string = 'hello world!!';
my $passphrase = 'my passphrase';
my $encrypted_string = $string ^ $passphrase;
print $encrypted_string, "\n";
my $decrypted_string = $encrypted_string ^ $passphrase;
print $decrypted_string, "\n";
Note: I'm assuming that when you said "it does not need to be secure" you really
meant "it does not need to be secure".
Cheers,
Rob