Hello, I tried doing what you suggested, but it does not compare it.
I am kinda lost now :((. Can't seem to understand the behaviour. Not sure if Apache is the one responsible or Perl. Thanks Sumit > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Saturday, November 11, 2006 12:25 AM > To: Sumit Shah > Cc: Dondi M. Stroma; modperl@perl.apache.org > Subject: Re: Mod_perl and HTTP IO issue > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Wed, Nov 08, 2006 at 09:04:36PM -0500, Sumit Shah wrote: > > Thanks for pointing that out. Really silly of me. > > > > After correcting it, it seems that $result does not equate > to 'INVALID' > > even though the server returned INVALID. I can see that if I output > > the value as: > > > > $r->send_http_header('text/plain'); > > print "This is the value for result------:$result\n"; > > > > > > Does the socket NOT return a string? > > > > #READ THE RESPONSE BODY > > while (defined($content = <SOCK>)) { > ^^^^^^^ > > This will read up to line separator... > > > $result = $result . $content; > > } > > > > if($result eq 'INVALID'){ > > #do something... > > } > > So, if your line separator is, let me guess, "\n", $result > might contain now "INVALID\n". You might fare better either > chomp()ing $result or comparing ``if($result =~ /^INVALID/)''. > > But I am guessing wildly. > > Regards > - -- tomás > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.1 (GNU/Linux) > > iD8DBQFFVV7BBcgs9XrR2kYRAtAlAJ49JXpXVdgtSdngoG0qbGG2swt9IwCaA1g5 > oLxD7Sy1hYiXF0I7bE2SEbM= > =/A4S > -----END PGP SIGNATURE----- > >