in reply to socket communication problems

Hi Bruce32903,

One thing I see right off the bat is that you're using my $MySocket within some of the if ... else clauses.  That means that they are different variables from the $MySocket at the top of the program.

Here's a simplified example:

#!/usr/bin/perl use strict; use warnings; my $MySocket = "abc"; if (1) { my $MySocket = "123"; print "Inside while loop: \$MySocket = '$MySocket'\n"; } print "Outside while loop: \$MySocket = '$MySocket'\n"; __END__ Output: Inside while loop: $MySocket = '123' Outside while loop: $MySocket = 'abc'

When you remove the extra my keywords, does that get you closer to success?


s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/

Replies are listed 'Best First'.
Re^2: socket communication problems
by Bruce32903 (Scribe) on Feb 01, 2007 at 17:33 UTC
    Oops, block copy got me again.  I have looked at the code 
    dozens of times and not seen the extra "my".  Thank you.
    After this fix the "A direction" and "B direction" give the
    same results.  That is a step in the right direction.  The
    alarm works and I am not getting stuck (good) but I am still
    not getting out of the box (bad).  I assume that I have a
    routing issue.  My next step is to address the "double new"
    issue in the next comment.  Then I will see how far I have
    gotten.
    
    Thank you,
    Bruce