in reply to Perlish way to do an ls *.sf

I don't get how the lines after system() are going to work with the data, but you could do something like:

opendir( DIR, $targetdir ) || die $!; my @files = grep{ /\.sf$/ } readdir( DIR ); ## do interesting stuff with @files

If you are supposed to receive a real shell-expanded text, like /foo/bar/*.sf, then use a glob

## when passing something like *.pl, make sure ## to single quote it so that the shell doesn't ## automatically expand it: ## ## scrip.pl '/foo/bar/*.pl' ## my @entries = <$ARGV[0]>;