Advertisement
cd62131

without grep

Dec 24th, 2017
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.28 KB | None | 0 0
  1. #!/usr/bin/env perl
  2. use strict;
  3. use warnings;
  4. my @test;
  5. my ($min, $max) = (15122421, 15123012);
  6. open my $f, '<', 'test.txt' or die;
  7. while (<$f>) {
  8.   next if /^\s*$/;
  9.   my $i = (split ',')[0];
  10.   push @test, $_ if $min <= $i && $i <= $max;
  11. }
  12. close $f;
  13. print for (@test);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement