in reply to Why system calls suck.
It won't work because any executable files have that darned asterisk at the end.# This doesn't work my @files = `ls *`; chomp(@files); @files = grep { /\.p[lm]$/ } @files;
But that's just a symptom of a larger issue: There are better ways to get a list of files. Use system commands only as a last resort, and even then you should use a fully qualified pathname.
buckaduck
|
|---|