in reply to foreach increment problem?

$_ doesn't contain all the elements of the array, the problem is that $t->get("1.0", "end") returns the entire contents as a scalar(at least from what you are saying it appears that way), so $fields[0] contains the entire content of the field.

I haven't really used Tk much, but perhaps this would work:
my @field = split(/\n/, $t->get("1.0", "end"));

- Tom