Check if Process is running

Hi ,

I have a csh code below which check the process if it's running.
Can any expert advise me on the following:
1) what does this notationmean ">!" and how is it different from the append ">" notation ?
2) how does "setenv" work in this code ?

# Check whether there is a running process else quit script
ps -ef | grep moniter_11thDec | grep "bin" | grep -v "grep" >! $TEMP/temp_file.txt
setenv PROCS `cat $TEMP/temp_file.txt | wc -l`
if ($PROCS > 1) exit 1
  1. Force redirection even if noclobber is set
  2. Equivalent to set/export sequence

Equivalent to set/export sequence

Making the variable global

Hi jp2542a & dinjo_jo,

Thanks for the guidance.
I am trying to put this code from csh to Perl.
Can you help me convert as i am still a novice in Perl ?