in reply to Getting an ANSI X.12 file's delimiters
Anyway, as to your particular implementation: I've found that some EDI sources use (almost certainly non-compliantly... but the spec has some minor vagueries) an "\r\n" pair as their segment separator, or, even wackier include a following linefeed (and/or carriage return) after their segment separator (since this is how the spec examples tend to make the files appear). So I end up with using:
as my segment separator.($isa =~ /.{105}(.?\r?\n?)/)[0]
P.S. In other geeky stories... have you ever had to have an argument with your boss about why "grep" is inappropriate for X12 files?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Getting an ANSI X.12 file's delimiters
by delirium (Chaplain) on Dec 08, 2003 at 23:55 UTC |