#!/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
In reply to Re: Counting words..
by kwaping
in thread Counting words..
by No-Lifer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |