http://qs1969.pair.com?node_id=1002033


in reply to compare most recent file with second most recent file and output difference

You can get a list of the files this way:
chdir $logdir; @files = glob 'audit_*_010000.csv';
They probably should be in sorted order, but if occasionally that's not the case, you can do:
@files = sort glob 'audit_*_010000.csv';
Now files[-1] will be the name of the most recent file and $files[-2] the one of the previous file, assuming @files >= 2. So now, you can compare them.