All the strings in each of the rows and columns are of fixed length.
In that case it may be worth considering unpack. This way if you have a blank field represented by a space it will still work.

I've assumed each field is separated by a space (the x). You may have to adjust the field widths to taste.

#!/bin/perl5 use strict; use warnings; my $rec = q{maps_c7 360_925_RV 3195943 00 56 0K9048}; my @flds = unpack qq{A10xA14xA7xA5xA6xA6}, $rec; print qq{*$_*\n} for @flds;
output:
*maps_c7* *360_925_RV* *3195943* *00* *56* *0K9048*
See also perlpacktut:
two of the most misunderstood and most often overlooked functions that Perl provides
:-)

In reply to Re: Reading a file as an multi dimensional array Please help by wfsp
in thread Reading a file as an multi dimensional array Please help by sas429s

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.