Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^2: adding a column of integers

by ikegami (Patriarch)
on Jun 26, 2006 at 18:30 UTC ( [id://557633]=note: print w/replies, xml ) Need Help??


in reply to Re: adding a column of integers
in thread adding a column of integers

perl -lne '$sum+=$_; END{print $sum}'
and
perl -le '$sum+=$_ while <>; print $sum'
don't slurp either. <> is an iterator (in scalar context).

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://557633]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (2)
As of 2024-04-26 02:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found