Just being picky, this will print all of the output lines on a single
line separated by spaces. Since you probably want to see them on
separate lines, you could either not chomp
my @files = qx(ls);
print @files;
or append newlines on output
chomp(my @files = qx(ls));
print "$_\n" foreach @files;
line separated by spaces. Since you probably want to see them on
separate lines, you could either not chomp
my @files = qx(ls);
print @files;
or append newlines on output
chomp(my @files = qx(ls));
print "$_\n" foreach @files;
No comments:
Post a Comment