3 ms·
I've found that Perl works even better for this. my @allfiles = `ls /somedir/`; for my $file (@allfiles) { chomp $file; ... } Is a wonderful thing. It's not p
by jsight 15y ago
I've found that Perl works even better for this.
my @allfiles = `ls /somedir/`;
for my $file (@allfiles) {
chomp $file;
...
}
Is a wonderful thing. It's not pretty Perl, but it's still better than Bash, IMO.