Hello Ben,

Hope this is what u expected

#!/usr/bin/perl
system("cat /etc/hosts");
print `cat /etc/hosts`;

$? contains the status returned by the last pipe close, backtick(``) command or *system* operator.

--
Prabu.M.A
When I was born I was so surprised
        I didnt talk for a period and half
                                 -Gracie Allen


BenBart wrote:
Hi all,

Is there another option of running an OS command or UNIX script besides using system "[OS_COMMAND]", for example system "cat /etc/hosts" or system "[UNIX_SCRIPT]"?

How can I make sure that the system '[OS_COMMAND]" finishes its run before I proceed to run the rest of the codes in the script?

Thanks in advance ...






--
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