in reply to RE: Re: Unexpected Array
in thread Unexpected Array

Fastolfe is in all likelyhood completely correct.

Don't forget that $item will have a newline at the end of it. That's not the problem here, but it may not be what you intend.

Also, if chandata.txt gets very large, you're holding it in memory twice. You may want to loop through the file line by line and just extract the info you want.