#!/usr/bin/perl -w
# rename files in tree example: renameit.pl "oldregex" "newregex" /dir
use File::Copy;
my $old = $ARGV[0];
my $new = $ARGV[1];
open F,"find $ARGV[2] -depth -print |";
while(<F>){
  chop; 
  ($n=$_)=~s/$old/$new/g; 
  move($_, $n)
}
