Subject: | Documentation bug |
Date: | Sun, 29 Dec 2019 14:43:32 +0100 |
To: | bug-IO-Handle-Packable [...] rt.cpan.org |
From: | Mark Lawrence <nomad [...] null.net> |
Hi Paul,
I think you meant to open a "read" (<) handle instead of a "write" (>)
one:
use IO::Handle::Packable;
my $fh = IO::Handle::Packable->new;
$fh->open( "my-data.dat", ">" ); ##### HERE #####
while( my ( $x, $y, $value ) = $fh->unpack( "S S i" ) ) {
print "Value at ($x,$y) is $value\n";
}
The above code loops forever when the file is empty...
Cheers,
Mark
--
Mark Lawrence