programming-examples/perl/Statement/From to.pl

10 lines
148 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
#!/usr/bin/perl
use warnings;
use strict;
my $start = 2;
my $end = 4;
while (<>) {
($. == $start)..($. == $end) and print "$.: $_";
}