in reply to Pattern Match in @array

Sounds like grep might be the ticket here. do_something($_) foreach grep(/DB/, @files);which will call do_something with every element of the @files array that has "DB" somewhere in it.

As to part (b), there's no Perl built-in equivalent to the creat system call (not that I'm aware of). If you want to create a zero-length file with a particular name, you can just write to it:

open(I, ">$filename"); close(I);
Alternatively, if you're on something Unix-y, you can use the shell to "touch" the file: system("touch $filename"); HTH