summaryrefslogtreecommitdiff
path: root/usr.bin/vi/perl_scripts/wc.pl
blob: 0a5015987d10edd01fc79a4598d7e76a44c6dfbd (plain)
1
2
3
4
5
6
7
8
9
10
11
sub wc {
  my $words;
  $i = $VI::StartLine;
  while ($i <= $VI::StopLine) {
    $_ = $curscr->GetLine($i++);
    $words+=split;
  }
  $curscr->Msg("$words words");
}

1;