my $oldfilename='Testfile'; my $newfilename=$oldfilename; $newfilename=~s/^./B/; # # another option instead of the regular expression would # be to assign to a substr... This will probably be slightly # faster # # substr($newfilename,0,1)='B'; # link $oldfilename, $newfilename or die "link error $!"; unlink $oldfilename or die "unlink error $!";