check if $count is defined.

This commit is contained in:
Mariano Alvira 2009-05-18 17:57:21 -04:00
parent 6d75aa1bed
commit 6cafcc1234

View file

@ -115,7 +115,7 @@ if(scalar(@ARGV)!=0) {
my $c; my $count; my $c; my $count;
while(1) { while(1) {
($count, $c) = $ob->read(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"; $ob -> close or die "Close failed: $!\n";