in reply to Extracting ranged data
gives this as a result from your example data#!/usr/bin/perl open IN, "in.txt" or die "Can't Open input\n"; $count = 0; while (<IN>) { chomp($_); if ($_ =~ /Users/) { print $_,"\t=\t"; } elsif ($_ =~ /\.\.\./) { print $count,"\n"; $count = 0; } else { if ($_) { $count++; } } }
Users of some feature = 3 Users of some other feature = 3 Users of yet another feature = 0
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Extracting ranged data
by blaze (Friar) on Jul 24, 2002 at 21:21 UTC |