amelinda has asked for the wisdom of the Perl Monks concerning the following question:
So, really, I can just strip off the 's and extra spaces and then split on the commas, right? That's what I currently have going. All seemed to be ok... But I am horribly wrong.'12342248','BAR ','12JUNK ','6532918 12" JUNK ON BAR-709/8709/811 ', +' ','A',01,'N',' ','01',000000,+000030.00,+000150.00,'I',' + ' '13121751','FOO ','13FUNK ','6715500 FOO FUNK-331/334 ', +' ','A',03,'N',' ','99',000000,+000134.00,+000275.00,'I',' + '
Notice how one of the text fields has a few entries with an embedded comma. In some, other records, one of the other text fields has an embedded '. Now what?'18592038','BL ','17BLE ','6715500 17" BLETCH BLE-333,334 ', +' ','A',01,'N',' ','00',000000,+000007.00,+000200.00,'R',' + '
Unpack seems to be the answer, but the documentation in the Camel (and what I've supersearched here) is pretty sketchy. Can anyone help? I'd really appreciate explanations that include how and why, so that I might be converted to the happy use of unpack.
|
|---|