# Munge filenames to commands: my @commands= map { sprintf "mv -i '%s' '%s.bak'", quotemeta($_), quotemeta($_) } @remote_files;