Uses the for statement to read four input lines and write three of them.
#!/usr/local/bin/perl for ($line = <STDIN>, $count = 1; $count <= 3; $line = <STDIN>, $count++) { print ($line); }