L
laredotornado
Hi,
I'm using Perl 5.10.1 on Ubuntu Linux 11.04. I want to run a Perl
script B from within Perl script A. I can run Perl script B fine from
the bash shell, but when I try and run it within Perl script A, it
fails to execute with a "No such file or directory " error. I'm
hoping someone might have some advice about what I'm overlooking.
Here's how I create and spawn Perl script B ...
my $cmd = "perl /opt/scripts/selenium/generate_test_suite.pl \"$
{project} USA Tests - ${module}\" \"$destTestDir\" \"$testSuiteFile\"
";
runShellCommand( $cmd );
sub runShellCommand {
my $cmd = shift;
print "running command $cmd ...\n";
open(F, "$cmd") or die "Can't execute command \"$cmd\": $!";
while (<F>) {
print;
}
close(F);
print "done.\n\n";
}
Thanks, - Dave
I'm using Perl 5.10.1 on Ubuntu Linux 11.04. I want to run a Perl
script B from within Perl script A. I can run Perl script B fine from
the bash shell, but when I try and run it within Perl script A, it
fails to execute with a "No such file or directory " error. I'm
hoping someone might have some advice about what I'm overlooking.
Here's how I create and spawn Perl script B ...
my $cmd = "perl /opt/scripts/selenium/generate_test_suite.pl \"$
{project} USA Tests - ${module}\" \"$destTestDir\" \"$testSuiteFile\"
";
runShellCommand( $cmd );
sub runShellCommand {
my $cmd = shift;
print "running command $cmd ...\n";
open(F, "$cmd") or die "Can't execute command \"$cmd\": $!";
while (<F>) {
print;
}
close(F);
print "done.\n\n";
}
Thanks, - Dave