- or download this
#usage: ./getfone.pl output
use strict;
...
open(NL, "namelist.txt) || die $!;
open(PB, "phonebook.txt") || die $!;
open(OUT,">$ARGV[0].txt") || die $!;
- or download this
while(1) {
- or download this
my @phonelisting = <PB>;
chomp(@phonelisting);
my @name = <NL>;
chomp(@name);
- or download this
my @phonesearch = grep @name, @phonelisting;
- or download this
print OUT "@phonesearch\n";
last if eof;
- or download this
close (NL);
close (PB);
close (OUT)