in reply to check to see if a file has todays data in it, if it has exit if not then add data
> But if todays Date is not in column A then copy the data and append to the monthly file.
Your script seems to check every single line in elsif if it doesn't have todays date, and of course there are lines which are older, hence you append.
You'll need to check all lines (or better only the last one) first ALONE in one loop and AFTER this loop (if you haven't exited yet) you can append your data.
Cheers Rolf
( addicted to the Perl Programming Language)
|
|---|