home *** CD-ROM | disk | FTP | other *** search
- #!/usr/bin/perl
-
- $in = "";
- @lines = ();
-
- print "Enter some text >";
- while($in = <STDIN>) {
- print "\n";
- last if ($in =~ /^quit$/i);
- push(@lines, $in);
- print "Enter some text >";
- }
- chomp @lines;
- print "\n";
- print "You typed:\n";
-
- for ($i = 0; $i <= scalar(@lines); $i++) {
- print sprintf("%03d", $i), $lines[$i], "\n";
- }
-
- exit;
-