That's difficult to say but there's a few things you can do that should help you solve it.
First make sure your script starts like this:
#!/pathe/to/perl -w
use strict;
Notice the -w to enable warnings. Also use strict will help you identify code issues.
Another thing that helps a lot is storing the command you want to run in a scalar and printing it to see what it is actually doing:
my $result = "filename.txt";
chomp($result);
my $cmd = sprintf("mv /home/pi/downloads/%s /home/pi/downloads/sent/%s", $result, $result);
print "$cmd\n";
system($cmd);
In your script do you get the value for $result from user input? I have a feeling it has a newline character. The chomp function will safely remove newline characters from the end of a string.