integrated these two scripts to run one from the other -- so you now just have to use matchandsort.pl  The scripts also now accept the frequency data and turn the data into occurrence.
run like this: 'perl matchandsort.pl -input=../testdata/pfg-cpl.txt -xyfile=../testdata/pfgXY.txt -separator=0'