nr0mx has asked for the wisdom of the Perl Monks concerning the following question:
while(<DATA>) { my @array = split(/,/); print join(',',@array[0..3]),",$array[3],$array[4],",join(',',@arr +ay[4..$#array]); } __DATA__ 20110_1,1155,30,20110_1_3,0,0,65,0,0,99,20,20,14,0,23,2001-08-01 00:00 +,2001-09-18 00:00,0,,0, 20110_2,1155,30,20110_2_3,0,0,65,0,0,99,20,20,14,0,23,2001-08-01 00:00 +,2001-09-18 00:00,0,,0, 20110_3,1155,30,20110_3_3,0,0,65,0,0,99,20,20,14,0,23,2001-08-01 00:00 +,2001-09-18 00:00,0,,0,
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Need help constructing a one-liner
by jeffa (Bishop) on Dec 02, 2003 at 13:29 UTC | |
by duff (Parson) on Dec 02, 2003 at 14:54 UTC | |
by nr0mx (Scribe) on Dec 02, 2003 at 14:17 UTC | |
|
Re: Need help constructing a one-liner
by exussum0 (Vicar) on Dec 02, 2003 at 12:59 UTC |