It prints all zeros in "Changed fonts" line....open(INPUT, "< ./vrsticni_fonti.txt") or die "Couldn't open ./vrsticni_fonti.txt for reading: $!\n"; my $line; while (<INPUT>) { $line = $_ ; print "Line: $line \n"; # my @rows = ( 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x04, 0x00 ); my @rows = ($line =~ m/(0x[a-fA-F0-9]+)/g); print "Extracted numbers : " . join("|", @rows) . "\n"; my @cols = (0) x 8; for my $c ( 0 .. 7 ){ $rows[ $_ ] & 1 << $c and $cols[ $c ] |= 1 << $_ for 0 .. 7; } print "Changed fonts : " . join("|", @cols) . "\n"; # printf "0x%02x\n", $_ for @cols; } close(INPUT);
In reply to Re^2: Font bitmaps manipulation in perl (transposing row like font description to column like)....
by Anonymous Monk
in thread Font bitmaps manipulation in perl (transposing row like font description to column like)....
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |