timmyb85 has asked for the wisdom of the Perl Monks concerning the following question:

Do you know how to close this connection? My error is (modified IP and port):

connecting to host 123.456.789.012 (123.456.789.12), port 1234 connection open

The code that deals with this error is:

open (MPRINT, "| $testconnect") || die "Can't open pipe to $mconn $!" +; print MPRINT "- Time:\n $date\n"; print MPRINT "- Name:\n $frmName\n"; print MPRINT "- Phone:\n $frmPhone\n"; print MPRINT "- Dept:\n $frmDept\n"; if ($FORM{'DeptBillingCode'}){ print MPRINT "- Department Billing Code:\n $frmDe +ptBillingCode\n"; } if ($FORM{'IDR'}){ print MPRINT "- IDR:\n $frmIDR\n";<br> } print MPRINT "- Building:\n $frmBuilding\n"; print MPRINT "- Room Number:\n $frmRoom\n"; if ($FORM{'Contact'}){ print MPRINT "- Contact:\n $frmContact\n"; } if ($FORM{'EquipmentType'}){ print MPRINT "- Equipment Type:\n $frmEquipmentTy +pe\n"; } print MPRINT "- Model Number:\n $frmModelNumber\n"; if ($FORM{'SerialNumber'}){ print MPRINT "- Serial Number:\n $frmSerialNumber +\n"; } print MPRINT "- Problem:\n $frmProblem\n"; if ($FORM{'WarrantyStatus'}){ print MPRINT "- Warranty Status:\n $frmWarrantySt +atus\n"; } if ($FORM{'BestTime'}){ print MPRINT "- Best Time:\n $frmBestTime\n"; } if ($FORM{'OtherInfo'}){ print MPRINT "- Other Information:\n $frmOtherInf +o\n"; } close(MPRINT);
Note
$testconnect is something like: "mconnect 123.456.789.012 -p 1234"

Thank You, Tim

Edited by BazB. Changed pre tags to code tags.

Replies are listed 'Best First'.
Re: Closing mconnect
by jfroebe (Parson) on Apr 07, 2004 at 22:10 UTC
    Hi Tim,

    Check to see what command (or signal) needs to be made for mconnect to disconnect and shut itself down. Searching for mconnect on Google shows a utility for connecting to a smtp server. From the looks of your script above, it doesn't appear that you are doing that.

    My guess is that you need to send the command "exit" or similar.

    hope this helps

    Jason L. Froebe

    No one has seen what you have seen, and until that happens, we're all going to think that you're nuts. - Jack O'Neil, Stargate SG-1