in reply to Importing MySQL dump file remotely
A simple, non-perl solution would be to use the local mysql client:
If the mysql client isn't available locally, install it; it's worth the small effort.