in reply to POST to remote cgi from within local perl file?

Your field values are not being interpolated from the variables. Try:

name => $name,
You don't need to quote those at all

After Compline,
Zaxo