my @words; my $len; while (<TEXT>) { $len += @words = split /\s+|[,:]/; } print "LEN = $len\n";
The regex here is a guess at what you might need.
--
John.
In reply to Re: Out of memory
by jmcnamara
in thread Out of memory
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |