in reply to (jeffa) 3Re: Convert a Tab-Delimeted File to XML
in thread Convert a Tab-Delimeted File to XML

My comment would have broken merlyns code and I feel I should post an apology. A split on \t would have left @values with an extra linefeed, so to be able to handle a proper tab-separated header you also need to:
chomp $labels[-1]
after splitting on \t. If the header is really one-or-more-whitespace-characters-separated, then the original code is fine. Feel free to mod me down or take experience points or whatever is the punishment du jour :-)