#!/usr/local/bin/tclsh # $Id: sumcol.tcl,v 1.5 2001/01/04 22:42:49 doug Exp $ # http://www.bagley.org/~doug/shootout/ # from: Miguel Sofer proc main {} { set sum 0 while {[gets stdin line]> 0} { incr sum $line } puts $sum } main