in reply to passing files with

This type of redirection sends data to a program's "standard input", which can be referenced with the Perl STDIN filehandle:
while (<STDIN>) { print "Got a line: $_"; }
Just be aware that each line you read will have its trailing newline. Use chomp to get rid of it.