Just another Perl shrine | |
PerlMonks |
Re: compare most recent file with second most recent file and output differenceby bart (Canon) |
on Nov 02, 2012 at 19:41 UTC ( [id://1002033]=note: print w/replies, xml ) | Need Help?? |
You can get a list of the files this way:
They probably should be in sorted order, but if occasionally that's not the case, you can do: 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.
In Section
Seekers of Perl Wisdom
|
|