in reply to move command

Don't start an external program when Perl has a fine built-in that has no problems with special characters - see rename:

use strict; my $filename = 'new&name.txt'; rename $filename => "new&filename_renamed.txt";

Replies are listed 'Best First'.
Re^2: move command
by hobbs (Monk) on Jul 08, 2009 at 06:49 UTC
    rename has limitations -- in particular, on most systems it will only work if the source and destination are on the same filesystem. File::Copy::move will use rename if it's appropriate, or do a copy-and-delete if rename won't work, so it's a more flexible solution.