#!/usr/bin/perl -w # xor.pl - Don Yang (uguu.org) # # XOR stdin with a fixed key and print to stdout. # # 07/06/10 use strict; die "$0 [files...]\n"unless $#ARGV >= 0; my $key = shift @ARGV; my $text = join '', <>; print $text ^ (chr($key) x length($text));