I'm not looping at all, I'm just trying to run another perl script from my perl script. However my process list fills up with the command stored in "$check_env_cmd". The script being called works fine on it's own. I don't get it! Here are what I think are all the relevant parts of my calling script -- it just executes the command in system() hundreds,thousands of times!
my $check_env_cmd="/usr/bin/perl /home/jchase/programming/moodle_rooms
+_sync/sync_mumoodle.pl --modules --blocks";
#Make sure that a few of the critical Moodle Tests pass before loading
+ new db
my $result=system($check_env_cmd);
if ($result){
print "Environment Check Passed\n";
}else{
print "Environment Check Failed\n";
exit 1;
}
I've also tried using backticks instead of the system() function. Same result. I tried inputting the command straight into system() as well but no joy. I'm sure I'm doing something stupid but I don't understand what -- it seems pretty straightforward. Is there something funny about calling a perl command from a perl command?
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|