in reply to Extra Stuff

Hmm... don't know why your code crashes; the extra values returned from the split should be thrown away. You shouldn't have anything like ($var1, $var2, $var3, ...) on the left hand side of an assignment. Use an array instead, e.g.:
foreach $rec (@CUSTDATA) { chomp $rec; my @vars = split(/,/,$rec); }
Maybe that will fix your code?

-Ton
-----
Be bloody, bold, and resolute; laugh to scorn
The power of man...