Hi All,

I am opening a secure socket and write data to the socket. After the data is
written I should be able to read the server response from the socket (I am
able to see this in a corresponding Java program), but the program just dies
with no response back from the server.

Can someone please tell me what I am doing wrong?

Thanks
Sai

#!/usr/bin/perl

# include the package
use IO::Socket;

# open the socket
$socket = IO::Socket::INET->new(Proto=>"tcp", PeerAddr=>"wwwcie.ups.com",
PeerPort=>"https(443)", Reuse=>1)
 or die "Can't open socket\n";

print "After open socket\n";

$socket->autoflush(1);

$confirmfile = "c:/myperl/Confirm.txt";

open CONFIRM, $confirmfile;

while (<CONFIRM>) {
  print $socket $_ or die "Error writing to Socket";
}

print "After while confirm\n";

open CONFIRM, $confirmfile;

#sysread ($socket, $buf, 100) or die "Error in sysread\n";

while (<$socket>) { 
  print ;
  print "In while loop\n";
}

print "After while socket";

close $socket;

_______________________________________________
Perl-Unix-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to