in reply to Why system calls suck.

I've seen a very similar problem with our users here. The "ls" alias is commonly used for "ls -F", which will for example append asterisks to filenames if they are executable. If you use a system call to read the filelist and then search for Perl programs like this:
# This doesn't work my @files = `ls *`; chomp(@files); @files = grep { /\.p[lm]$/ } @files;
It won't work because any executable files have that darned asterisk at the end.

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