Could ($data = <test>) be returning a string which is a copy of $data, instead of a reference to $data? That would explain what's happening; the first chomp() cleans up the copy, but leaves $data unaffected.
Ron Steinke rsteinke@w-link.netIn reply to Re: Tied filehandles and chomp
by rsteinke
in thread Tied filehandles and chomp
by nmueller
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |