Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: compare most recent file with second most recent file and output difference

by bart (Canon)
on Nov 02, 2012 at 19:41 UTC ( #1002033=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1002033]
help
Chatterbox?
[LanX]: yep
[erix]: or Ctrl-U to view current html :P
[LanX]: name not id
[LanX]: id isn't approved AFAIK
[LanX]: name works
erix feels silly for having actually tested that contiguous values make no difference in CLUSTERing a table (At least, in postges)
[LanX]: Perl Monks Approved HTML tags
[LanX]: erix and his postguess ...
[erix]: (Grrres...)
[dabella12]: I have a problem install tK on CeontOs using perl 5.24

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (10)
As of 2017-06-24 13:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (557 votes). Check out past polls.