Problems in running a Perl script via cronjob

I have a very basic perl script that attempts to find if a process is running. If the process is not running then the script is supposed to start the process. If I execute the script from command line it works fine as expected. However if the script is executed via cronjob, the script cannot find if the process is running or not. Here is the script:
-----------------------------------------------------------------------
#!/apps/public/perl_5.8.8/bin/perl

#----------------main starts here-----------------------
main();
#----------------main ends here-----------------------

sub main {
my $fRunning = 0;

\#    my @prList = \`/usr/bin/ps -ef | grep genStatRmtSrv.pl\`;
\#    foreach \(@prList\) \{

open (prFile, "/usr/bin/ps -aef | grep genStatRmtSrv | " );
while (<prFile>)
{
chomp;
print "$_\n";

    if \(/perl/ && /genStatRmtSrv.pl/\) \{
        $fRunning = 1;
        print "Process is running: $_\\n";
        break;
    \} 
\}
close \(prFile\);

if \($fRunning == 0\) \{ 
    print "genStatRmtSrv.pl process is not running\\n";
    chdir '/mot/proj/www/www.iden/htdocs/wlan/trial/bin' or die "Can't chdir to /: $!";
    system \("./genStatRmtSrv.pl"\);

}
--------------------------------------------------------------------
Here is the email I receive when the cronjob executes:

a45678 11566 11565 0 16:26:08 ? 0:00 sh -c /usr/bin/ps -ef | grep genStatRmtSrv
a45678 11567 11566 0 16:26:08 ? 0:00 grep genStatRmtSrv
genStatRmtSrv.pl process is not running

----------------------------------------------------------------------
Here is the cronjob entry (for testing purpose, it is being run every min.)

          • (cd /home/a45678/bin; /home/a45678/bin/svrCron.pl)
            ------------------------------------------------------------------------
            Here is the output when I run from a unix terminal:

[isdlogin2:~/bin]% ./svrCron.pl
a45678 25400 25399 0 18:13:51 pts/488 0:00 sh -c /usr/bin/ps -aef | grep genStatRmtSrv
a45678 10976 1 0 14:30:59 ? 0:00 /apps/public/bin/perl ./genStatRmtSrv.pl
Process is running: a45678 10976 1 0 14:30:59 ? 0:00 /apps/public/bin/perl ./genStatRmtSrv.pl

----------------------------------------------------------------------
perl version:

/apps/public/bin/perl -v

This is perl, v5.8.4 built for sun4-solaris

Copyright 1987-2004, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using `man perl' or `perldoc perl'. If you have access to the
Internet, point your browser at Perl.com Home Page, the Perl Home Page.

-----------------------------------------------------------------------
Solaris machine:
[isdlogin2:~/bin]% uname -a
SunOS isdlogin2 5.8 Generic_117000-05 sun4u sparc SUNW,Sun-Fire-480R
------------------------------------------------------------------------
The process is running fine:

[isdlogin2:~/bin]% ps -ef | grep genStatRmtSrv
a45678 25630 16082 0 18:18:56 pts/488 0:00 grep -iy genStatRmtSrv
a45678 10976 1 0 14:30:59 ? 0:00 /apps/public/bin/perl ./genStatRmtSrv.pl

Why is the version of perl you ran to get the version number ina different location to the one specified in the shebang line at the beginning of your script?

Also you appear to be running different versions of your script from cron and from the shell, one is using ps -aef, and the other is just using ps -ef (which you appear to have commented out of the script at some point).