in reply to Array of arrays - redux

Is this close to what you're describing?

#! perl -slw use strict; my @data; $data[ $_ ] = [ map int( rand 100 ), 1 .. 10 ] for 0 .. 1e3; my @lookback; my $matches = 0; for my $row ( @data ) { for my $lb ( @lookback ) { if( $row->[ 3 ] < 10 && $lb->[ 7 ] > 50 ) { print "condition matched ", ++$matches; last; } } push @lookback, $row; shift @lookback if @lookback > 15; }

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".
In the absence of evidence, opinion is indistinguishable from prejudice.

Replies are listed 'Best First'.
Re^2: Array of arrays - redux
by JockoHelios (Scribe) on Jun 17, 2013 at 17:46 UTC
    It might be, but my Perl knowledge isn't up to the level at which I could understand that code :)
    Dyslexics Untie !!!

      It is not complicated code. Take it one line at a time and study it.

      Play with it. Add print statements to see what is going on. Ask questions -- in this thread -- about things you do not understand.

      With a few hours or a coupe of days you should be able to make sense of it. And that time will stand you in good stead for the rest of your Perl experience.


      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".
      In the absence of evidence, opinion is indistinguishable from prejudice.