tphyahoo has asked for the wisdom of the Perl Monks concerning the following question:
UPDATE: Thanks very much. Will work on rewriting and repost. Wish I could vote you all up but I have squandered all my xp for the day.my %fields; #$csvIn is a Text::xSV object. while ($csvIn->get_row()) { ($fields{partner}, $fields{kampagne}, $fields{keywordCluster}, $fields{keyword}, $fields{clicks}, $fields{leads}, $fields{orders}, $fields{jaronVerguetung}, $fields{partnerVerguetung}, $fields{profit}) = $csvIn->extract(qw(partner kampagne keywordCluster keyword clicks leads orders jaronVerguetung partnerVerguetung profit)); #set nulls to empty string. Have to do this or there will be +problems later printing the data rows. (($fields{partner}, $fields{kampagne}, $fields{keywordCluster}, $fields{keyword}, $fields{clicks}, $fields{leads}, $fields{orders}, $fields{jaronVerguetung}, $fields{partnerVerguetung}, $fields{profit}) ) = map { unless ( defined ($_) ) { "" } else + {$_} } ($fields{partner}, $fields{kampagne}, $fields{keywordCluster}, $fields{keyword}, $fields{clicks}, $fields{leads}, $fields{orders}, $fields{jaronVerguetung}, $fields{partnerVerguetung}, $fields{profit} ); }
s/until later/bis bald/
:)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Text::xSV question - could this be written better?
by Animator (Hermit) on May 20, 2005 at 13:44 UTC | |
by jeffa (Bishop) on May 20, 2005 at 13:46 UTC | |
|
Re: Text::xSV question - could this be written better?
by davidrw (Prior) on May 20, 2005 at 13:51 UTC | |
by tphyahoo (Vicar) on May 20, 2005 at 14:15 UTC | |
|
Re: Text::xSV question - could this be written better?
by tilly (Archbishop) on May 20, 2005 at 15:33 UTC |