Please try and be more descriptive with the subject lines.
-----------------------------------------
Craig Moynes
[EMAIL PROTECTED]
"chris
robinson" To: <[EMAIL PROTECTED]>
<cyrobins@bigpo cc:
nd.net.au> Subject: help!
06/05/01 08:52
AM
I have the following code. This code prints a / for each occurance of a
certain number/word in a file. How would I change this to print a / for
each 5 instances of a given word/number?
Thanks
#!/usr/bin/perl
my $file;
$file = $ARGV[0];
open( "file", "< $file") or die "Cannot open image file $file\n";
$text = join('', <file>);
%count = ();
for (split(/\s/, $text)) {
$count{$_} .="/";
}
foreach $word (sort keys %count) {
next unless $word =~ /\d/;
next if $word =~ /p2/i;
next if $word =~ /^\#/
;
printf("%-05s%s\n", $word, $count{$word});
}
- Re: Descriptive Subjects - was (Re: help!) Craig Moynes/Markham/IBM
- Re: Descriptive Subjects - was (Re: help!) chris robinson
- A gentle reminder about jeopardy quoting Elaine -HFB- Ashton
- RE: A gentle reminder about jeopardy quo... Eduard Grinvald
- Re: A gentle reminder about jeopardy... Randal L. Schwartz
- RE:[OT]A gentle reminder about jeopa... Paul
- RE: A gentle reminder about jeopardy... Mark Folse
- Re: A gentle reminder about jeop... Elaine -HFB- Ashton
- Re: A gentle reminder about... Mark Folse
- Re: A gentle reminder a... Brett W. McCoy
- Re: A gentle reminder about jeopardy quo... Brett W. McCoy
