in reply to Best way to write in Perl
system("mv b.txt a.txt"); [download]
rename('b.txt', 'a.txt'); [download]