- or download this
#!/usr/bin/perl
use strict;
...
print "found $line\n" if $zipcodes{ $line };
}
__END__
- or download this
use Path::Tiny;
my $file = 'index.txt';
my %zipcodes = map { $_, 1 } path( $file )->lines({chomp => 1});
- or download this
my @lines = path( $file )->lines({chomp => 1});