use File::Slurp 'write_file'; BEGIN { write_file( "$0.gpg", q[ YOUR ENCRYPTED SOURCE HERE ] ); eval `gpg --symmetric --decrypt $0.gpg `; }