Switch to Control Perl Split Behavior
HL7 message API and helper tools
Brought to you by:
b2pi,
wyldebeast
Addition of a switch at some level, HL7 or Message
level to control the behavior of the Perl split
function.
From the PerlFunc Documentation :
"If LIMIT is negative, it is treated as if an
arbitrarily large LIMIT had been specified."
As an example, from the Message.pm, a possible
solution.
@fields = split('\\' . $self->{FIELD_SEPARATOR},
$segments[$i], $Net::HL7::PRESERVE_TRAILING );
where $Net::HL7::PRESERVE_TRAILING can be set to -1.
Other modules may also be touched.
This allows for trailing pipes, etc. from begin
removed from the optional string representation of a
HL7 message.
Thanks