Hi
I am trying to store the output of a command into an array in perl script.
I am able to store but the problem is i am unable to print the array line with one line space. i mean i inserted the \n in loop ...but not getting the result.
I have written like this
#!/usr/bin/perl
@a = system ("ls -l");
chomp @a;
foreach $i (@a) {
print "$i\n\n";
}
exit(0);
After the ls -l output only i m getting 2 line space ...i need spcae between every line in the array ...
Pls suggest me