in reply to Error Msg of LWP::UserAgent

You have a my on line 5 that shouldn't be there. (Copy and paste error?)