Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: How to process variable length fields in delimited file.by shadowsong (Pilgrim) |
on Oct 06, 2016 at 11:37 UTC ( [id://1173394]=note: print w/replies, xml ) | Need Help?? |
Hi dbach355 Seeing as how The number of fields is fixed, the number of fixed field lengths and variable field lengths varies - if all you need is another file with custom delimiters; you can achieve this with a one-liner:
The offset within the @F array denotes each input field in your file; so offset 0 would represent ssn, offset 1 employee number and so on; simply craft your output line how you'd like it... See http://www.perl.com/pub/2004/08/09/commandline.html for additional command line options. Cheers,
In Section
Seekers of Perl Wisdom
|
|