You are still opening up a shell process and then forking off an ls, which has
to read the directory and select only the files you want. You can save the
shell and the ls by using something simple like
opendir(DIR, "$a");
while ($file = readdir(DIR)) {
push(@files, $file) if $file =~ /^$b/;
}
Using DirHandle or File::Find would be an even better choice, but this is
probably the simplest and least code.
-spp
This message posted from opensolaris.org
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code