in reply to how to read every 10 line from input text file ?
sleep after every 10th line. See also $.
open (FILE,"file.txt"); while (my $data = <FILE>) { chomp($data); print ("$data\n"); sleep 60 if $. % 10 == 0; } close(FILE);
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: how to read every 10 line from input text file ?
by avanta (Beadle) on Nov 24, 2010 at 03:32 UTC | |
Re^2: how to read every 10 line from input text file ?
by chrestomanci (Priest) on Nov 24, 2010 at 10:00 UTC | |
by Anonymous Monk on Nov 24, 2010 at 10:35 UTC |
In Section
Seekers of Perl Wisdom