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

I suggest you comment out this line temporarily
$company .= $hashC{$pk} || '';.

If you still get -C appearing in the output then check the data carefully for trailing spaces. You can also add the primary key into the output temporarily with separators like this to see spaces or other reason why they don't match up.

print join ' ',$key,$le,fmt_mdy($date),fmt_mdy($rdate),$company,"|$pk +|\n";
poj

Replies are listed 'Best First'.
Re^4: issue with output of file matching
by rruser (Acolyte) on Jun 07, 2013 at 21:49 UTC

    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

      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!