http://www.perlmonks.org?node_id=855075


in reply to Re: uninitialized string variable
in thread uninitialized string variable

At the very least, the first step to debugging would be for the OP to print out (delimited) what was read, what the contents of $data looked like, etc.