This way all the six-letter strings are pushed onto @array.
#!/usr/bin/perl -w use strict; use warnings; use Data::Dumper; my @array; while ((my $name = <DATA>)) { my @t = split(/\./, $name); my $string = join('', map(chr, @t[15 .. @t-2])); push @array, $string; } print Dumper( \@array ) . "\n"; __DATA__ iso.3.6.1.4.1.9.9.392.1.3.21.1.2.6.100.97.110.115.117.101.18481153 = S +TRING: iso.3.6.1.4.1.9.9.392.1.3.21.1.2.6.100.97.110.115.117.101.18481154 = S +TRING: iso.3.6.1.4.1.9.9.392.1.3.21.1.2.6.100.97.110.115.117.101.18481155 = S +TRING: iso.3.6.1.4.1.9.9.392.1.3.21.1.2.6.100.97.119.110.105.103.18468865 = S +TRING: iso.3.6.1.4.1.9.9.392.1.3.21.1.2.6.100.97.119.110.105.103.18468866 = S +TRING: iso.3.6.1.4.1.9.9.392.1.3.21.1.2.6.103.105.108.98.111.105.18460673 = S +TRING: iso.3.6.1.4.1.9.9.392.1.3.21.1.2.6.103.105.108.98.111.105.18460674 = S +TRING: iso.3.6.1.4.1.9.9.392.1.3.21.1.2.6.103.105.108.98.111.105.18460675 = S +TRING: iso.3.6.1.4.1.9.9.392.1.3.21.1.2.6.106.101.114.116.114.97.18366465 = S +TRING: iso.3.6.1.4.1.9.9.392.1.3.21.1.2.6.106.101.114.116.114.97.18366466 = S +TRING: iso.3.6.1.4.1.9.9.392.1.3.21.1.2.6.106.101.114.116.114.97.18366467 = S +TRING: iso.3.6.1.4.1.9.9.392.1.3.21.1.2.6.106.111.97.104.117.114.18477057 = S +TRING: iso.3.6.1.4.1.9.9.392.1.3.21.1.2.6.106.111.97.104.117.114.18477058 = S +TRING: iso.3.6.1.4.1.9.9.392.1.3.21.1.2.6.106.111.97.104.117.114.18477059 = S +TRING: iso.3.6.1.4.1.9.9.392.1.3.21.1.2.6.106.117.100.110.111.114.18505729 = +STRING: iso.3.6.1.4.1.9.9.392.1.3.21.1.2.6.106.117.100.110.111.114.18505730 = +STRING: iso.3.6.1.4.1.9.9.392.1.3.21.1.2.6.106.117.100.110.111.114.18505731 = +STRING: iso.3.6.1.4.1.9.9.392.1.3.21.1.2.6.115.116.101.104.111.112.18489345 = +STRING: iso.3.6.1.4.1.9.9.392.1.3.21.1.2.6.115.116.101.104.111.112.18489346 = +STRING: iso.3.6.1.4.1.9.9.392.1.3.21.1.2.6.115.116.101.104.111.112.18489347 = +STRING: iso.3.6.1.4.1.9.9.392.1.3.21.1.2.6.119.97.108.97.100.108.18452481 = ST +RING: iso.3.6.1.4.1.9.9.392.1.3.21.1.2.6.119.97.108.97.100.108.18452482 = ST +RING: iso.3.6.1.4.1.9.9.392.1.3.21.1.2.6.119.97.108.97.100.108.18452483 = ST +RING:

In reply to Re^3: Lines of single character to array by pme
in thread Lines of single character to array by ALykke

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.