in reply to Re: comparing 2 columns
in thread comparing 2 columns

It works just great! Thanks so much! I tried to see how it works and it appears that in this line: print "match: $key record: $record\n" if exists $keys{$key}; $key holds the value of the second and third columns and record holds the first column. what is this: my ($record, $key) = split ',', $_, 2; the split is for the comma but what is the 2? Is that for 2 columns? Not sure -can you explain? I have been reading Alvin Alexander tutorial on hash but I am still green.

Replies are listed 'Best First'.
Re^3: comparing 2 columns
by AnomalousMonk (Archbishop) on Jan 05, 2016 at 05:29 UTC
    ... split ... what is the 2?

    Please see split documentation,  LIMIT in particular.


    Give a man a fish:  <%-{-{-{-<