Before you do anything else, read Writeup Formatting Tips (as I already advised), and update your posts using "code" tags for your error messages and Perl code. Your posts are difficult to understand.
Comment on Re^3: Simple perl question (use code tags)