in reply to Reading in the first 10 lines of a file
#!usr/bin/perl use strict; open FILE, "<$ARGV[0]"; # $ARGV[0] is the file name # to pass in in the command line. my $i=1; while (<FILE>) { if ($i >10) { last;} print $_ ; $i++; } close FILE; [download]