in reply to check in an array for variable

Sounds like you want HTML::Entities's decoding facilities.