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

Merlyn is right, but you may also want to check the return value on the system call.

system("grep -i $_ /etc/mail/aliases") == 0 or die "grep program failed";