in reply to calling perl script from shell script
apart from forgetting a fi, your using the wrong braces:
(something) calls "something" in a subshell, which always returns true. The syntax you're looking for is:
or alternativelyif test $? -eq 0 then else fi
Use square braces in stead of round ones. finally, it might be easier to use:if [ $? -eq 0 ] then else fi
cd go_to_dir_where_perl_program_exists && if /usr/bin/perl perlscript.pl then echo "success" # do some more stuff else echo "failure" # do some more stuff fi
In Section
Seekers of Perl Wisdom