in reply to Re: Building a dynamic array or some other method?
in thread Building a dynamic array or some other method?

Sadly, the file is already sorted, and making it uniq based on one field isn't enough. Thank you though!

Your deep structure uh, scares me. I'm just learning how to access the structure in $aoh (array of hashes) above and it's already been painful enough! (I'm crying uncle here!) I like where cavac was going with it. De-referencing arrays has been very painful for me.

I knew I was going to get in trouble for the lack of use Strict and use Warning. (LOL)

I don't know what HTH! means. (I'm new here)
  • Comment on Re^2: Building a dynamic array or some other method?

Replies are listed 'Best First'.
Re^3: Building a dynamic array or some other method?
by jdporter (Paladin) on Apr 23, 2024 at 14:26 UTC
Re^3: Building a dynamic array or some other method?
by choroba (Cardinal) on Apr 23, 2024 at 08:03 UTC
    HTH = Hope This Helps

    map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
Re^3: Building a dynamic array or some other method?
by The_Dj (Scribe) on Apr 24, 2024 at 00:59 UTC
    Both solutions I offered filter the entire line.
    Not just one field.

    Unless I've totally misunderstood what you mean by CSV?

    (As an aside, if the source is already filtered, unix has a command uniq that removes duplicate lines from pre-sorted files,so in my first solution just change sort -u for uniq)