in reply to Re: Hashes and Arrays - Selecting a memory structure
in thread Hashes and Arrays - Selecting a memory structure

My apology for being a bit unclear on the requirements..

I'm better with examples: I need to process multiple log files containing thousands of 'DOW' related records each. (same data structure as shown in my original post). My goal is to determine if any record in the new log files contain a value in the 7th element that is greater than the current maximum value stored in the 'DOW' record of an index maximum CSV file. That CSV file will contain only 1 record per financial index. (ie DOW, SP500)

  • Comment on Re^2: Hashes and Arrays - Selecting a memory structure

Replies are listed 'Best First'.
Re^3: Hashes and Arrays - Selecting a memory structure
by GrandFather (Saint) on Sep 20, 2007 at 19:23 UTC

    The while loop doesn't care if the lines come from one file or many, but the sample code is much more concise if I use a single 'file' with duplicated lines. You could:

    @ARGV = @filenames; while (<>) { $filename = shift @filenames if $. == 1; ... }

    to process a swag of files.


    Perl is environmentally friendly - it saves trees