in reply to Re (tilly) 1: Text::xSV
in thread Text::xSV
sub bind_header { my $self = shift; $self->bind_fields($self->get_row()); $self->{field_name} = [ @{$self->{row}} ]; # this is new delete $self->{row}; } # the following method is new: sub get_header { my $self = shift; if ( exists( $self->{field_name} )) { return wantarray ? @{$self->{field_name}} : $self->{field_name +}; } }
That works for me, but maybe you would want to do it a little differently. Thanks very much for this module, and for your discussions in various threads about CSV data -- you got my vote.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re (tilly) 1: Text::xSV
by tilly (Archbishop) on May 01, 2003 at 15:50 UTC |