.CARD OK Ime Prezime (nobody@example.com)
.ACTION
-.ACTION CMENUS0
+.ACTION CMENUS
.NOP
-.NOP
-
-
.NOP
-.NOP
.NOP
-.NOP
-
.NOP
-.NOP
-.NOP
-.NOP
-
-.END
+.END
});
#warn "# send_receive=",dump( \@send_receive );
print $socket "$send\r\n";
my $got = <$socket>;
$got =~ s/[\r\n]+$//;
-warn dump($send,$expect,$got);
+warn "# send/expect/got ",dump($send,$expect,$got);
warn "<< $got\n";
- die "ERROR expected [$expect] got [$got]" if $expect ne $got;
+ if ( defined $got && defined $expect && $expect ne substr($got,0,length($expect)) ) {
+ warn "ERROR expected [$expect] got [$got]\n";
+ print "Response>";
+ my $r = <STDIN>; chomp $r;
+ print $socket "$r\r\n";
+ }
+
}
$socket->close();