http://www.perlmonks.org?node_id=1019808


in reply to Re: replace/substituion 4th field
in thread replace/substituion 4th field

chomp $line; my @fields = split "," , $line; ... print join( ',', @fields ) . "\n" ;

That won't work correctly on the data provided.    You need to change split "," , $line to split "," , $line, -1.

Replies are listed 'Best First'.
Re^3: replace/substituion 4th field
by tmharish (Friar) on Feb 21, 2013 at 06:39 UTC

    Absolutely - Updated above.