freebsd-dev/contrib/nvi/perl_scripts/wc.pl
Peter Wemm b8ba871bd9 Import of nvi-1.79, minus a few bits that we dont need (eg: postscript
files, curses, db, regex etc that we already have).  The other glue will
follow shortly.

Obtained from: Keith Bostic <bostic@bostic.com>
1996-11-01 06:45:43 +00:00

12 lines
171 B
Perl

sub wc {
my $words;
$i = $VI::StartLine;
while ($i <= $VI::StopLine) {
$_ = $curscr->GetLine($i++);
$words+=split;
}
$curscr->Msg("$words words");
}
1;