Of course (BTW, you put single quotes around *.pl, which won't expand to filenames in the shell). TMTOWTDI, and the elegant way would be to redirect STDOUT and STDERR in Perl, and use fork/exec, but I guess you do not want to go that far. Simplistically it is not all that different from shell:
for my $script glob('*.pl') {
system ("perl $script>$script.log 2>&1");
}
I havn't done a separate compile phase, chargrill showed how to do that if you need it. I am 'cheating' by allowing the shell to do the redirection, which purists will not like, but it is simpler this way. You can programatically pick up the exit value from the call by testing the return value from system(), or $? (die returns 255 or the last value of $!).
| [reply] [d/l] |