Questions: Are the files perl source, or are you compiling something else? Which operating system are you running on? The solution provided above will work on *nix systems only (strictly speaking `ls *.pl` is an unnecessary child, *.pl should be enough).