#!/usr/bin/perl -w use strict; rename "/home/jdoe/test", "/home/jdoe/testnew" or print "/home/jdoe not found\n";