Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: wrong in minus

by AnomalousMonk (Archbishop)
on May 10, 2018 at 18:08 UTC ( [id://1214345]=note: print w/replies, xml ) Need Help??


in reply to wrong in minus

... I just want to the number of the first column to minus the second column.

Note that the OPed statement
    $a=$tmp1[1]-$tmp1[0];
yields the result of the second column minus the first column. (Actually, it gives you the result of the second array element minus the first and we're assuming these elements are input data columns, but that's another question.)

Update: It just occurred to me that the OPed question might be properly paraphrased as "I want the number of the first column to be subtracted from the second column"; in that case, disregard the reply above.


Give a man a fish:  <%-{-{-{-<

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (3)
As of 2024-04-16 22:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found