programming-examples/perl/Statement/Uses the for statement to read four input lines and write three of them.pl
2019-11-15 12:59:38 +01:00

6 lines
128 B
Perl

#!/usr/local/bin/perl
for ($line = <STDIN>, $count = 1; $count <= 3; $line = <STDIN>, $count++) {
print ($line);
}