in reply to compare most recent file with second most recent file and output difference
They probably should be in sorted order, but if occasionally that's not the case, you can do:chdir $logdir; @files = 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.@files = sort glob 'audit_*_010000.csv';
|
|---|