I am trying to execute the following unix command through perl script and put the result in array, but the output of the array is always 0. For exaple: if the output that I got from Unix is 'Hello Othello', the value which stored in $returncode is 0.
My code is:
my $returncode = system("grep $value /usr/share/lib/dict/words");
my @array1 = split/ /, $returncode;