N
noauth
The following code works fine for CommandString1, but it does not work for CommandString2.
The result is a "No such file or directory" error message. I believe this is because "cd"
is a built-in shell command. Does anyone have any suggestions on how I can overcome this?
$CommandString1 = "ls ..";
$CommandString2 = "cd ..";
local $/ = \1; # Read 1 character at a time
open(STATUS, "$CommandString1 2>&1|") || ddie "Unable to run specified command...$!";
while (<STATUS>) {
dprint "$_";
}
close(STATUS);
open(STATUS, "$CommandString2 2>&1|") || ddie "Unable to run specified command...$!";
while (<STATUS>) {
dprint "$_";
}
close(STATUS);
The result is a "No such file or directory" error message. I believe this is because "cd"
is a built-in shell command. Does anyone have any suggestions on how I can overcome this?
$CommandString1 = "ls ..";
$CommandString2 = "cd ..";
local $/ = \1; # Read 1 character at a time
open(STATUS, "$CommandString1 2>&1|") || ddie "Unable to run specified command...$!";
while (<STATUS>) {
dprint "$_";
}
close(STATUS);
open(STATUS, "$CommandString2 2>&1|") || ddie "Unable to run specified command...$!";
while (<STATUS>) {
dprint "$_";
}
close(STATUS);