Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^3: Close a file and reopen a new one at midnight

by MidLifeXis (Monsignor)
on Jan 14, 2013 at 19:18 UTC ( #1013263=note: print w/replies, xml ) Need Help??


in reply to Re^2: Close a file and reopen a new one at midnight
in thread Close a file and reopen a new one at midnight

  • You now should have updated the $hrmin and $ymd variables.
  • You still have a problem if no data is received at '1228'.
  • You still have a problem overwriting a file if this gets restarted.
  • There are also options out there that handle this for you (one that is log4j-like, one that is tied, listed below by clueless_newbie, and probably others). See FileRotate for some options.

--MidLifeXis

  • Comment on Re^3: Close a file and reopen a new one at midnight

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1013263]
help
Chatterbox?
[thezip]: oops... My mind is backwards (this works): find . -mindepth 2 -name "*.csv" | xargs wc -l

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (11)
As of 2016-12-06 18:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (113 votes). Check out past polls.