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

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!

Replies are listed 'Best First'.
Re^7: issue with output of file matching
by poj (Abbot) on Jun 11, 2013 at 15:01 UTC
    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

      You are a genius poj

      Thank You so much! now on to my next bump in the road

        I found my next bump in the road, when appending the carry over file I found that if the car moves again in the same month and has a date in file1 and not file2 it messes with the date matching:

        I get this: ACFX 28523 L 5/30/13 5/10/13 HALLIBURT-C ACFX 28523 L 5/1/13 HALLIBURT-C should look like this: ACFX 28523 L 5/30/13 HALLIBURT ACFX 28523 L 5/1/13 5/10/13 HALLIBURT-C

        I wrote a quick script that compares the date and outputs the car numbers and I can manually fix but would like to avoid having to touch the file (more room for user error) The duplicate car number also picks up the -C when it is not a carryover. Your genius will be much appreciated.