# Subscript
PrintLog("My sub-script is running...","i");
PrintLog("Yes, just to confirm I am running...","i");
...etc...onto the SQL stuff
####
my $run_pid = open(RUN, "sub_script.pl $options 2>&1 |") or $sub_failed = 1;
if (!$sub_failed) {
$text .= "Entered if (!\$sub_failed) {\n";
while () {
$text .= "Entered while ()\n";
chomp;
$_ =~ s/^\s*//;
$text .= "$_\n";
}
close(RUN);
if ($? != 0) { $sub_failed = 1; }
}
else { $text .= "Failed to open sub_script.pl\n";}
print "$text";
####
Entered if (!\$sub_failed) {
or
Entered if (!\sub_failed) {
Entered while ()
or
Entered if (!\$sub_failed) {
Entered while ()
My sub-script is running...
or
Entered if (!\$sub_failed) {
Entered while ()
My sub-script is running...
Yes, just to confirm I am running..
and so on...