Home | About Me | Photos | Writing | Research | Scratchpad | Projects

prename


#!/usr/bin/perl -w

($op = shift) || die "Usage: rename perlexpr [filenames]";


for (@ARGV)
{
        $was=$_;
        eval $op;
        die $@ if $@;
        rename($was,$_) unless $was eq $_;
}