calling a cgi file from shell script????

Hi..

Is it possible to call a cgi program which is used to display a pop up message in the else part...On executing the script it directly prints the source code of the pop up screen..

Please if you have any idea,share with us.Thanks.

#start

success250=`grep -c failure /proj/mats/www/mats/tmp/data_cpars_job.out`

mail_list="elavv2003@gmail.com"

if [ "$success250" -eq 1 ]
then
echo "Hi success"

else

    echo "Hi failure"

perl cpars.cgi

fi

#End

Maybe you can change the cgi script to show its output in plain text with an option (or maybe if some of the standard CGI variables are unset, indicating that it is being run from the command line); or else, pipe the output to something which strips out the HTML tags, such as a simple sed script.