Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^3: adding a column of integers

by Anonymous Monk
on Sep 02, 2004 at 21:19 UTC ( [id://388116]=note: print w/replies, xml ) Need Help??


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

perl -lpe '$-+=$_}{$_+=$-}{'

Replies are listed 'Best First'.
Re^4: adding a column of integers
by Smylers (Pilgrim) on Sep 03, 2004 at 08:31 UTC

    That's overkill; miss out 3 of the characters and it still works:

    perl -lpe '$-+=$_}{$_=$-'

    Smylers

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2024-03-29 15:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found