in reply to Re^3: issue with output of file matching
in thread issue with output of file matching

thanks for that code I was able to fix my formatting and space issues so the appended file is the same field widths. I am still not getting the fields to match up.

ACFX 28523 L 05/18/13 ABCCO ACFX 28523 L 05/01/13 ABCCO-C ACFX 28526 L 05/28/13 ABCCO ACFX 28526 L 05/01/13 ABCCO-C ACFX 44866 L 05/28/13 ABCCO ACFX 44866 L 05/01/13 ABCCO-C ADMX 49266 L 05/03/13 05/16/13 PFGCO ADMX 63770 L 05/12/13 05/21/13 PFGCO ADMX 63975 L 05/12/13 05/30/13 PFGCO
the first and second row need to match (they do perfectly without the +-C) need them to look like: ACFX 44866 L 05/01/13 05/28/13 ABCCO-C

I made sure file1 and file2 are both the same column widths, so now i just think the issue is with the company names not being exact...thanks

Replies are listed 'Best First'.
Re^5: issue with output of file matching
by poj (Abbot) on Jun 08, 2013 at 12:40 UTC
    What output do you get with $pk added and the separator changed to | like this ? ;
    print join '|',$pk,$key,$le,fmt_mdy($date),fmt_mdy($rdate),$company,"\ +n";
    poj

      I get the following:

      ACFX 28523 L ABCCO |ACFX 28523| L | |05/ +18/13| ABCCO | ACFX 28523 L ABCCO-C |ACFX 28523| L |05/01/13| + | ABCCO-C |

      Thank You!

        In the input_data sub replace the chomp with this regex to remove newline and any trailing spaces on the company name.
        while ( <FILE1> ) { #chomp $_; s/\s*$//;
        poj