The system() function returns zero on success and non-zero on failure (see the perlfunc documentation).
And there's no reason to make a system call to 'mv' when you can use the rename() function or the move() function from File::Copy.
Jeff japhy Pinyan,
P.L., P.M., P.O.D, X.S.:
Perl,
regex,
and perlhacker How can we ever be the sold short or the cheated, we who for every service have long ago been overpaid? ~~ Meister Eckhart