--- [EMAIL PROTECTED] wrote:

> 
> Checking " if (system($touchcmd) && system($chkstat)) " as
> condition. Is this a valid one? also was trying to get this done
> buy calling subroutine. 
> 

No. Generally when an unix command was executed successfully, it will
return 0. ie,

$ perl  -le '$s = system("ls -l >/dev/null");print $s'
0

so,you'd better use the condition with $? variable (though it's not
absolute),

$ perl  -le 'system("ls -l >/dev/null");if ($?==0) {print "true"}'
true

Best Regards,
Jeff (joy) Peng


      
____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to