in reply to passing files with

Yes. Short answer: try: $ perldoc perlopentut then search (using ' / ' ) for '<>' (skip the quotes) longer answer: while (<>) { print "current file is: $_ \n"; # do stuff with file }