Everything seems fine, but with a failure your call to $sender->MailFile(...) should be returning an error code which will evaluate as true. Therefore your die "Sender error, $sender, $Mail::Sender::Error!" won't execute.
If Mail::Sender is successful it should return a reference, so what you should do to test for failure is wrap the call like this:
ref ($sender = new Mail::Sender ({from => $mailf[2], smtp => 'localhos
+t'}))
|| die "Sender error: $sender, $Mail::Sender::Error!\n";
ref ($sender->MailFile({to => $mailf[0], subject => $mailf[1], msg =>
+"@body", file =>$mailf[4]}))
|| die "Sender error, $sender, $Mail::Sender::Error!";
This should catch your errors for you...
ryddler