Foreach loop

What am I doing wrong with this foreach loop?

foreach var ($argv)
@sum = $sum + $var

Please Dont post a new post unless until it is a new item , I think you posted this problem earlier, It will be easy if you will send it in the same link ..

Otherwise nobody is going to understand what is this

foreach var ($argv)
         @sum = $sum + $var

its a csh script or ksh script or sh script you are trying .. SO please see your last thread regarding this for your answer..

Need help on C-shell script program..

Yes I posted the whole problem before and you gave me an answer but i want to use my own code. I dont want to use someone elses code, I am just having trouble figuring out the problem with the foreach loop and seeing if anyone here has any ideas.

GO with your OWN code

foreach var ( $input )
@sum = $sum + $input
end

And please post some new thread before reading Rules and Regulation of this forum..Don't cofuse us ..

My original code has an error with the for loop