#!/usr/bin/perl -w use strict; use File::Find; # The shift here takes the first command line # argument and uses that as our path. find(\&rot_cat,shift); sub rot_cat { unless (open(INFILE,$_)) { warn "Can't open $_ - $!\n"; return; } local $/ = undef; # Slurp mode. my $contents = ; # Rot13 our contents. $contents =~ tr/A-Za-z/N-ZA-Mn-za-m/; # Print our new file. print $contents; }