csh has a very different syntax from Bourne shells such as bash; specifically:
You need to use set to assign variables, so:
a = (arun kumar input output pin port)
won't work, you need to use:
set a = (arun kumar input output pin port)
The syntax for if is if ( .. ) then [..] endif, rather then if [[ .. ]]; then [..] fi.
There are many other differences too. If you must use csh, then it's best to just forget about the Bourne shell and start from zero.
Anyway, what you want to do is "check if a word appears in a list". Your bash example isn't quite correct either, since it just converts the array to a string and then checks if a pattern occurs with =~. This works fine for some cases, but consider what would happen if you want to check if the word "out" appears in your list: it would match output.
One way to do this would be to use:
set a = (arun kumar input output pin port)
if ( " $a " =~ *" varun "* ) then
echo "Match found"
endif
Lists are automatically converted to a string. We surround this in spaces so that it only checks for the full word varun, rather than anything containing varun to fix the issue mentioned above.
I adapted the above from this answer on the Unix & Linux site (I don't use csh that often these days, so I couldn't remember what the best way to do it was), which I found with this search.
As an aside, csh is a very awkward language with many limitations and problems. I would highly recommend avoiding it and using bash (or even better: zsh) if you're able to.