in reply to Odd file rename
note the "link/unlink" that I do will not work under NTmy $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 $!";
|
---|