in reply to end of the line
My question is why didn't the file split on "\x{a}"? Isn't it the same as "/n"?
In *ix, it's the same. Elsewhere, it may not be. But that's not the problem, because what you see displayed is what $data contained when parse() was called, before split is even reached.
The problem is that every line will have trailing \x{d}. For example, $type will contain !Type:Bank\x{d} when you're expected it to hold !Type:Bank. This is probably because you sent the file over using a method that didn't convert DOS/Windows newlines ("\x0D\x0A") to *ix ones ("\x0A").
perl -i -pe 's/\x0D\x0A/\x0A/sg' dfcu0904.qif should fix your file
|
|---|