Well, I've made progress, naturally , not knowing anything about the format, I made guesses (copy/paste) ... but most of the methods that do stuff like parse don't return values ... so here you go
#!/usr/bin/perl -- use strict; use warnings; use Data::Dump qw/ dd pp /; use Business::Edifact::Interchange; sub Business::Edifact::Message::handle_ftx { package Business::Edifact::Message; my ( $self, $data_arr ) = @_; #~ ::dd( data_arr => $data_arr , lines => $self->{lines} ); my $lines = $self->{lines}; if( not @$lines ){ my $line = { line_number => $data_arr->[0]->[0], action_req => $data_arr->[1]->[0], item_number => $data_arr->[2]->[0], item_number_type => $data_arr->[2]->[1], additional_product_ids => [], item_description => [], monetary_amount => [], }; if ( $data_arr->[3]->[0] ) { $line->{sub_line_info} = $data_arr->[3]; } push @$lines, Business::Edifact::Message::LineItem->new($line) +; } $self->{lines}->[-1]->{free_text} = { qualifier => $data_arr->[0]->[0], # LIN/LNO reference => $data_arr->[2], }; if ( $data_arr->[3] ) { $self->{lines}->[-1]->{free_text}->{text} = join q{ }, @{ $data_arr->[3] }; } return; } my $edifact_message = q{UNA:+.? 'UNB+UNOC:3+1234567890123:14+321098765 +4321:14+131021:1523+391'UNH+1+INVOIC:D:96A:UN:EAN008'BGM+380+10776420 +90+9'DTM+137:20111020:102'DTM+35:20111020:102'FTX+AAK+1+ST2++DE'FTX+S +UR+1++DAS LEISTUNGSDATUM ENTSPRICHT DEM RECHNUNGSDATUM+DE'RFF+ON:2330 +-35573'RFF+DQ:283506034'DTM+171:20111018:102'RFF+ABO:1087211625'DTM+1 +71:20111020:102'NAD+BY+3210987654321::9'RFF+VA:230/5740/0622'RFF+API: +3508566'NAD+DP+4050964023306::9'NAD+SU+1234567890123::9'RFF+VA:DE2205 +64280'TAX+7+VAT+++:::7+S'CUX+2:EUR:4'LIN+1++1234567654321:EN'PIA+1+03 +460262:SA::91'IMD+A++:::NESLR Focaccia (24x400g) DE'IMD+C++IN'QTY+47: +1:PCE'MOA+203:32.65'MOA+131:-12.95'PRI+AAB:45.6:::1:PCE'ALC+A+1++1+DI +'MOA+8:12.95'RTE+1:12.95'LIN+2++1234567654321:EN+1:1'IMD+C++CU'QTY+59 +:1:PCE'UNS+S'MOA+77:34.94'MOA+79:32.65'MOA+125:32.65'MOA+124:2.29'TAX ++7+VAT+++:::7+S'MOA+79:32.65'MOA+124:2.29'TAX+7+VAT+++:::7+S'MOA+125: +32.65'UNT+44+1'UNH+2+INVOIC:D:96A:UN:EAN008'BGM+393+1087211625+9'DTM+ +137:20111020:102'NAD+CPE+3210987654321::9'RFF+FC:230/5740/0622'NAD+SU ++1234567890123::9'RFF+VA:DE220564280'NAD+PR+3210987654321::9'NAD+PE+1 +234567890123::9'TAX+7+VAT+++:::7+S'CUX+2:EUR:4'PAT+3'DTM+13:20111025: +102'UNS+S'MOA+86:34.94'MOA+9:34.94'MOA+124:2.29'MOA+125:32.65'UNT+19+ +2'UNZ+2+391'}; my $edi = Business::Edifact::Interchange->new(); $edi->parse($edifact_message); dd( $edi ); __END__

In reply to Re: Edifact anyone? by Anonymous Monk
in thread Edifact anyone? by Skeeve

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.