At 02:05 PM 5/3/02 -0400, Keddie, Diane wrote:
>We are working on an application that makes a socket connection to our
>mainframe to get information. The code we use for the socket connection is
>as follows:
>[snip]
>my $close=close($sock);
>
>The socket connection works, and we get the appropriate information back
>from our mainframe scripts. However, the return value from close($sock) is
>1 with "Bad file number" in $!. Should we be concerned that the socket
>connection is not closing properly and could cause other problems?
$ perldoc -f close
close FILEHANDLE
close Closes the file or pipe associated with the file
handle, returning true only if stdio successfully
flushes buffers and closes the system file
descriptor.
You got a true result. The connection closed properly. The value of $! is
irrelevant.
--
Peter Scott
Pacific Systems Design Technologies
http://www.perldebugged.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]