#!/bin/perl -w my $line = 0 while (<>) { chomp; $line += tr/ \t/./c; } print $line, "\n";