in reply to how can I input different files as an argument while I am running my perl program?
When you run your program, just specify the filename as
an argument on the command line:
The filenames can then be found inside the script in the global array @ARGV../program.pl file1.txt <optionally more files>
In Section
Seekers of Perl Wisdom