# do a line count of all my .pl files: BEGIN { @ARGV=glob("*.pl") } my $i = 0; while (<>) { $i++; } print "$i\n";