Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^2: Perl Format the Output in table

by Kenosis (Priest)
on Oct 11, 2012 at 17:51 UTC ( #998499=note: print w/replies, xml ) Need Help??


in reply to Re: Perl Format the Output in table
in thread Perl Format the Output in table

Nice work on processing the Output.txt file. However, if I'm understanding the OP correctly, the contents of domain.txt are used to filter the contents of Output.txt, such that expand.com will not appear in the final output when using the OP's shown data sets. Given this, perhaps something like the following additions are needed:

... open my $fh2, '<', 'domains.txt' or die "could not open domains.txt: $ +!\n"; my %domains = map { chomp; $_ => 1 } <$fh2>; close $fh2; open my $fh, "<", "output.txt" or die "could not open output.txt: $!\n +"; my %data; while (<$fh>) { chomp; $_ =~ m/(.*?)\s++(\d++)/; next unless $domains{$1}; ...

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://998499]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (11)
As of 2016-12-06 18:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (114 votes). Check out past polls.