in reply to how to print first 5 lines of a file

Just a minor modification to an earlier solution would allow you to print the first five lines of multiple files:
perl -pe 'close ARGV if $. == 5' file1 file2 ...

Update: The code above fails if one if the files is less than 5 lines long! This works better:

perl -pe 'close ARGV if $. == 5 or eof' file1 file2 ...

buckaduck