read all data because length is picture size, not data stream
[Printer-Zebra.git] / ZPL2pbm.pl
index e439ae4..8a7c2b7 100755 (executable)
@@ -31,8 +31,7 @@ while( $line ) {
 
                warn "# ~DG$1 => [$name] t=$t w=$w\n";
 
-               my $data;
-               read $in, $data, $t;
+               my $data = <$in>;
 
                my $out;
                # ZPL decompress