in reply to Mailing Using Perl

Off topic. Sorry, but I can't help but suggest that you might like to reconsider:
@files = `ls|grep $fileName`;
which would be inefficient even in a shell script. Maybe consider globbing (filename expansion/wildcards) instead?
@files = glob("*$fileName*");
This is assuming that $fileName does not contain an RE.
Update: Corrected glob construct