#!/usr/bin/perl $toBeEncrypted = "hi there"; $key = "nikos"; $encrypted = $toBeEncrypted ^ $key; print $encrypted ^ $toBeEncrypted; # Prints "nikos"