#!/usr/bin/perl -w use strict; foreach my $file (@ARGV) { open F, "<$file" or die "Can't read $_: $!\n"; while () { chomp; print "$file: $_\n"; } close F; }