in reply to parsing a file to get the count alone
Maybe you need something like this:
#!/usr/bin/perl use strict; use warnings; local $/ = "\nGenerating"; while(my $entry = <DATA>){ my ($table,$count) = $entry =~ /Summary of ([^\s]+).*(\d+)/s; print $table,": ",$count,"\n" if $count > 1; } __DATA__ Generating Summary of table_1 (count(*)) 1 Generating Summary of table_2 (count(*)) 2
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: parsing a file to get the count alone
by Hofmator (Curate) on Nov 07, 2006 at 10:32 UTC |
In Section
Seekers of Perl Wisdom