What about:

my $cmd = "ls -l";
system($cmd) == 0 or &error_msg("Could not run command");

Where error_msg is a function that takes a argument.

Michael



Sayed, Irfan (Irfan) wrote:
Hi All,
I am executing following command ` $MT chreplica`; I need to find out wheather this command is executing properly or not. If it's executing properly then i need to print the message saying that
" command executed successfully"
Can anybody please help me. Regards
Irfan.

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


Reply via email to