in reply to Re^2: Can't use string ("0") as a HASH ref
in thread Can't use string ("0") as a HASH ref

Looks like the module you use to obtain $myresult returns "0" in the case of error and you don't check whether the call was successful