I found this (here if you must know), and it caught my attention.
$ perl -ne 'print if ($seen{$_} .= @ARGV) =~ /10$/' file1 file2
I do know perl. But I do not know how this does what it does.
$ perl -ne 'print if ($seen{$_} .= @ARGV) =~ /10$/' <(echo 'zz\nabc\n3535\ndef') <(echo 'abc\ndef\nff')
abc
def
Seems like it just spits out the lines of the input files that are shared. Now putting every line into a hash as key, or something, I can see how it can help achieve that task, but... What the hell is going on with that regex?
Thinking about it some more, nothing about the use of .=
is obvious either.