in reply to Counting words..
#!/usr/bin/perl use strict; use warnings; read DATA, my $text, 40; ### this is the important line ### my $wordcount = () = $text =~ /test/gi; print $wordcount; __DATA__ TEST tester testing asdf lalala greatest
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Counting words..
by Roy Johnson (Monsignor) on Oct 24, 2005 at 17:41 UTC |