Update:BTW, there is an error in your data compared to the image; the R at the start of the middle line has come out as an I.

Inverting the table left as an exercise, as is programmaticly deriving the magic numbers :):

#! perl -slw use strict; use Data::Dump qw[ pp ]; $Data::Dump::WIDTH = 200; use List::Util qw[ min ]; my %pos; while( <DATA> ) { my( $c, $x1, $y1, $x2, $y2 ) = split ' '; $pos{ int( $y1 / 12 ) }{ int( $x1 / 10.5 ) } = $c; } my $firstY = min( keys %pos ); my @firstXs = sort{ $a <=> $b } keys %{ $pos{ $firstY } }; for my $y ( grep $_ != $firstY, keys %pos ) { $pos{ $y }{ $_ } //= ' ' for @firstXs; } pp \%pos; __DATA__ ... from the OP

Output:

C:\test>1114833 { 1 => { 1 => "T", 4 => "S", 6 => "E", 9 => "C", 11 => "I", 13 => "E", + 16 => "N", 18 => "E", 20 => "O", 23 => "T", 25 => "Y", 28 => "U", 30 + => "E" }, 3 => { 1 => " ", 4 => "I", 6 => "I", 9 => "L", 11 => "V", 13 => "E", + 16 => "V", 18 => "N", 20 => "U", 23 => "Y", 25 => "Z", 28 => "L", 30 + => " " }, 5 => { 1 => " ", 4 => "I", 6 => "O", 9 => "L", 11 => "I", 13 => "E", + 16 => "D", 18 => "P", 20 => "B", 23 => "H", 25 => "O", 28 => "S", 30 + => " " }, 7 => { 1 => " ", 4 => "B", 6 => "I", 9 => "C", 11 => "C", 13 => "Y", + 16 => "D", 18 => "I", 20 => "T", 23 => "Z", 25 => "I", 28 => " ", 30 + => " " }, 9 => { 1 => " ", 4 => " ", 6 => "N", 9 => " ", 11 => "K", 13 => "A", + 16 => " ", 18 => " ", 20 => " ", 23 => "L", 25 => " ", 28 => " ", 30 + => " " }, }

With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority". I'm with torvalds on this
In the absence of evidence, opinion is indistinguishable from prejudice. Agile (and TDD) debunked
, 28 =V

In reply to Re: Converting tesseract box data into 2d grid by BrowserUk
in thread Converting tesseract box data into 2d grid by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.