print "\nClient Started: Ready For Packet To Send:\n"; my $incre = 0; { last if $array[$incr] eq ''; if ($array[$incr] eq "[SEND]") { $incr++; if ($array[$incr] eq ("REGISTER" || "INVITE" || "ACK" || "BYE" || "OPTION" || "CANCEL")) { $incr++; my $msg=$method; print "\nSending message:$msg"; $MySocket->send($msg); } else { print "Bad Request :$array[$incr]"; exit 1; } } elsif ($array[$incr] eq "[RECV]") { $incr++; if($array[$incr] == (100 || 200 || 300 || 400)) { $incr++; print "Waiting for Response:\n"; $MySocket->recv ($text,1000);#///Recv print "\nReceived message From:$text"; } else { print "Bad Response name:$array[$incr]"; exit 1; } } else { print "Bare word found:"; exit 1; } redo; }