On 1 May 2005 20:15:19 -0700,
said:
> Dear All,
> I have some autogenrated CSV text where a typical line looks like this,
>
> "A", "B, C and D", "E",,,,,
>
> See the empty fields at the end? Now when I use quotewords, the
> trailing null fields are stripped from the result. So, I get only three
> fields. But I want to get the last columns as empty fields. In case of
> split, I could use the limit as the third parameter. Could any kind
> soul please tell me what I could do in this situation?
>
Quotewords? You don't mean as in 'qw'? Don't see how that applies.
Use Text::CSV. Really, there are more issues that dealing with additional
commas. You don't want to revisit them all.
--damian
--
@:=grep!(m!$/|#!..$|),split//,<DATA>;@;=0..$#:;while($:=@

{$;=rand
$:--,@;[$;,$:]=@;[$:,$;]while$:;push@|,shift@;if$;[0]==@|;select$,,
$,,$,,1/80;print qq x\bxx((@;+@|)*$|++),@:[@|,@;],!@;&&$/} __END__
Just another Perl Hacker,###
http://home.pacific.net.au/~djames.hub