#!/usr/bin/perl # rot13it.pl $firstfile = $ARGV[0]; $secondfile = $ARGV[1] || die "rot13it - an alpha-only 13 byte-shifting substitution cypher.\n\tUsage: rot13it \n" ; open (FIRST, "$firstfile") || die "EGADS! I can't open $firstfile\n"; open (SECOND, ">$secondfile") || die "Naughty, naughty... you can't create $secondfile!\n"; while (){ $_ =~ tr/A-Ma-mN-Zn-z/N-Zn-zA-Ma-m/; print SECOND $_; } close FIRST; close SECOND; system "ls -l $firstfile $secondfile 1>&2" ; print STDERR "All done...bye!\n";