check if $count is defined.
This commit is contained in:
parent
6d75aa1bed
commit
6cafcc1234
1 changed files with 1 additions and 1 deletions
|
@ -115,7 +115,7 @@ if(scalar(@ARGV)!=0) {
|
|||
my $c; my $count;
|
||||
while(1) {
|
||||
($count, $c) = $ob->read(1);
|
||||
print $c if ($count != 0);
|
||||
print $c if (defined($count) && ($count != 0));
|
||||
}
|
||||
|
||||
$ob -> close or die "Close failed: $!\n";
|
||||
|
|
Loading…
Reference in a new issue