$ARGV is the name of the current file being processed so you could do something like this:
perl -walne '$h{$ARGV}{$F[0]}.="$F[1]";END{ print ...}' file1.txt file +2.txt
In reply to Re: How to supply to input files at command line
by jwkrahn
in thread How to supply two input files at command line
by ZWcarp
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |