Hi ccelt09,
With the description of what you want to achieve, I suppose it all comes down to sorting your data with respect to the 5th column and then printing those out in different files ( correct me please if am wrong ) with respect to the range of the same column ( being between 1 and 1000,000,.. etc, 1 inclusive. Making the range 1000,000).
So, if assumption of what you wanted to do is correct, modifying Schwartzian transform a bit should work like so:

use warnings; use strict; use Data::Dumper; push my @array, map { [ int( $_->[1] / 1_000_000 ), $_->[0] ] } sort { $a->[1] <=> $b->[1] } map { [ $_, ( split /\s+/, $_ )[4] ] } <DATA>; print Dumper \@array; __DATA__ 0 50 4 46 723430 0 2 1 2 1 1 1 1 + 3 1 0 50 4 46 5533723430 0 2 1 2 1 1 1 + 1 3 1 0 50 4 46 33723430 0 2 1 2 1 1 1 1 + 3 1 0 50 2 48 654732 0 1 1 1 0 2 3 2 + 1 3
Produces ...
$VAR1 = [ [ 0, '0 50 2 48 654732 0 1 1 1 0 +2 3 2 1 3 ' ], [ 0, '0 50 4 46 723430 0 2 1 2 1 +1 1 1 3 1 ' ], [ 33, '0 50 4 46 33723430 0 2 1 2 1 + 1 1 1 3 1 ' ], [ 5533, '0 50 4 46 5533723430 0 2 1 2 1 + 1 1 1 3 1 ' ] ];
So, printing to different files is just a "function" of placement. The first element in the Array of Array being the file to save to. BUT have this in mind that I don't know how large your data is.
Am using data as posted by Loops and in fact his solution might be better.

If you tell me, I'll forget.
If you show me, I'll remember.
if you involve me, I'll understand.
--- Author unknown to me

In reply to Re: Use of Uninitialized in Concatenation or String Error? by 2teez
in thread Use of Uninitialized in Concatenation or String Error? by ccelt09

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.