in reply to No output using mysql import via perl

Are you sure you want to use

return "fail";
in the code? Shouldn't it be
die "fail";
by some chance?