in reply to Error in converted shell script (was: Pls Help)

I bet that here

print `cat /etc/mail/aliases | grep $_`;
you want to say:
print `cat /etc/mail/aliases | grep "$_"`;
or
print `cat /etc/mail/aliases | grep '$_'`;
And I daresay you're having some quirky user/dir-names :-) (spaces would suffice to break the grep-call) To be sure you should supply the list of subdirectory-names your greping for.

hth
regards,
tomte