All pastes #966769 Raw Edit

Something

public text v1 · immutable
·published 2008-04-01 23:49 UTC
rendered paste body
        if($sockread =~ /^PING/) {
                ($ping, $pong) = split(/:/, $sockread);
                while ( (index($pong,"r") >= 0) || (index($pong,"n") >= 0) ) {
                        chop($pong);
                        }
                print $sock "PONG :$pong\n";
                print "PONG :$pong\n";
                next;
        }