On Jan 18, 2008 7:00 AM, <[EMAIL PROTECTED]> wrote: > I just want to find out whether command("mk_view $view_name ETC") is > properly running or not.
I think you're looking for the program's exit status. Traditionally on Unix and many similar systems, the exit status is an integer, with 0 meaning "normal exit" and anything else meaning that something went wrong. That's the value that's used by programs that run other programs (such as the 'make' system utility) and need to know when a step has failed. In Perl, you can access the exit status with the $? variable after running a command via system or backticks. Beware: If your command is run by the shell, you'll get the shell's exit status, which may not be the exit status you were looking for. system $command; if ($?) { print "Oops, the command failed.\n" } If the program you're running itself doesn't notice that things have failed, of course, it won't be able to tell your program. In that case, you'll want to fix the external program, or find another way to identify problems. Good luck with it! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/