1 2 3 4 5 6 7
#!/usr/bin/perl $| = 1; while ($x = <STDIN>) { chomp $x; $c += length($x); print "$c\n"; }