use strict; use warnings; sub printfirst { my $f=shift; open(F,$f) or die "$!"; my $firstline=; print "$f: $firstline\n"; } printfirst('ALSF.pm');