Hi,
I did some few changes:
#!
/usr/bin/perl
# use
warnings;
# use
strict;
$command = `ls
-l`;
if (system($command) == 0)
{
}
elsif(system($command) != 0)
{
print "Failed to execute:
$?\n";
my
$c++
}
But I'm still not getting it right, this is my error output:
root@/user$ ./script.pl
sh: total: command not found
sh: line 1: -rw-r--r--: command not found
sh: line 2: -rw-r--r--: command not found
sh: line 3: -rwxr-xr-x: command not found
sh: line 4: -rwxr-xr-x: command not found
sh: line 5: -rwxr-xr-x: command not found
sh: line 6: -rwxr-xr-x: command not found
sh: line 7: -rwxr-xr-x: command not found
sh: line 8: -rwxr-xr-x: command not found
sh: line 9: -rwxr-xr-x: command not found
sh: line 10: -rwxr-xr-x: command not found
sh: total: command not found
sh: line 1: -rw-r--r--: command not found
sh: line 2: -rw-r--r--: command not found
sh: line 3: -rwxr-xr-x: command not found
sh: line 4: -rwxr-xr-x: command not found
sh: line 5: -rwxr-xr-x: command not found
sh: line 6: -rwxr-xr-x: command not found
sh: line 7: -rwxr-xr-x: command not found
sh: line 8: -rwxr-xr-x: command not found
sh: line 9: -rwxr-xr-x: command not found
sh: line 10: -rwxr-xr-x: command not found
Failed to execute: 32512