in reply to system( 'mv ...' ) not working?

Ah, your error is probably because the code my $newname = `convert $name`; returned "name\n", and you didn't chomp the $newname. Thus when you get to the line:
system("mv $newname /tmp/trashed");
you are actually telling the shell to:
mv name /tmp/trashed
That is, running mv with only one parameter, name. The cure? Just add chomp($newname); after my $newname = `convert $name`;