As stated before you can use -p to pass the password to the server.
But I recommend this:
mysql -h "hostaddress" -u "username" -p "database-name" < "sqlfile.sql"
Notice the password is not there. It would then prompt your for the password. I would THEN type it in. So that your password doesn't get logged into the servers command line history.
This is a basic security measure.
If security is not a concern, I would just temporarily remove the password from the database user. Then after the import - re-add it.
This way any other accounts you may have that share the same password would not be compromised.
It also appears that in your shell script you are not waiting/checking to see if the file you are trying to import actually exists. The perl script may not be finished yet.