in reply to Text::xSV question - could this be written better?
Update: changed @k to @field_names to be a little more descriptive.my %fields; #$csvIn is a Text::xSV object. my @field_names = qw/ partner kampagne keywordCluster keyword clic +ks leads orders jaronVerguetung partnerVerguetung profit /; while ($csvIn->get_row()) { @fields{@field_names} = $csvIn->extract( @field_names ); foreach my $k ( @field_names ){ $fields{$k} = "" unless defined $fields{$k}; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Text::xSV question - could this be written better?
by tphyahoo (Vicar) on May 20, 2005 at 14:15 UTC |