in reply to Unpack or substr to create CSV?
I only count 43 per line, could this be a source of your problems? There are many ways to do this, for example using regular expressions:
use strict; use warnings; while(<DATA>){ s/(.)(.{15})(.{14})(.{13})/$1,$2,$3,$4/; print; } __DATA__ 0123456789012345678901234567890123456789012 C4432882490H019000020150211ESL6690 0H2015PC C4833076550HC0P0000201412093J46651 0H2015DX C6033106980H057130020150323FRE7602 0H2015PC C663160140MT007015G20141124274847A MT2015PC
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Unpack or substr to create CSV?
by AnomalousMonk (Archbishop) on May 02, 2015 at 17:17 UTC |