AWK explanation

Hi,

Could anyone please explain why we have arr[$3]=1 - what does this statement do?

awk -F\; 'FNR==NR{arr[$3]=1;next};$3 in arr' core.txt gmrd.txt

Any help appreciated

I am only asking about this part of the AWK statement:

arr[$3]=1;next

cheers

FNR==NR{arr[$3]=1;next}

Creates an array called "arr" with indexes taken from the third column of the first input file.
All element values are set to 1 to represent "true".

The next statement forces awk to immediately stop processing the current record and go on to the next record.