troubleshooting Question

different command

Avatar of perlperl
perlperl asked on
Perl
12 Comments2 Solutions240 ViewsLast Modified:
in my perl script, i have sequence

$result = #### Execute some system command1. the output depends on command2. command2 generates something which is used by command1.

$test =  #### execute some command2

the issue is the $result depends on $test to complete $command2

If i use the above sequence, $command1 simply gets block for 40 secs to and $result is almost empty.

What I want is, the sequence of above two statements should be same, but somehow immidiately after executing command1, control should go to next statement to execute command2, after command2 is completely executed, how do i know that comaand1 is now completed its execution. i m not sure if some kind of trap  or fork or something else can be used.

NOTE: i cannot use the following sequence:
$test =  #### execute some command2
$result =  #### execute some command1

Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 2 Answers and 12 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 12 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros