changed the test condition to match the end of the captured string.

this is better in case there is junk at the beginning or if the first
one is incomplete.

also removed the debug ARGV print
This commit is contained in:
Mariano Alvira 2009-05-09 13:22:14 -04:00
parent 834ac85603
commit 60582e33bf

View File

@ -34,8 +34,6 @@ if($filename eq '') {
exit;
}
print @ARGV;
my $ob = Device::SerialPort->new ($term) or die "Can't start $term\n";
# next test will die at runtime unless $ob
@ -64,7 +62,7 @@ while(1) {
$test = 'CONNECT';
}
until($ret eq $test) {
until($ret =~ /$test$/) {
($count,$c) = $ob->read(1);
if ($count == 0) {
print '.';