<?xml version="1.0" encoding="windows-1252"?>
<node id="1013252" title="Re: Close a file and reopen a new one at midnight" created="2013-01-14 13:01:04" updated="2013-01-14 13:01:04">
<type id="11">
note</type>
<author id="733061">
flexvault</author>
<data>
<field name="doctext">
&lt;p&gt;&lt;a href="http://www.perlmonks.org/?node_id=109"&gt;AM&lt;/a&gt;,&lt;/p&gt;
&lt;p&gt;Two things after a glace at your code;
&lt;ul&gt;
&lt;li&gt;$hrmin is a string, and you're testing as a number.
&lt;code&gt;
  if ( $hrmin eq '1114' ) {
&lt;/code&gt;

&lt;li&gt;'1114' is before noon, '2359' is before midnight. You also should be concerned about seconds. A lot can happen in 60 seconds.
&lt;/ul&gt;
&lt;/p&gt;&lt;p&gt;You may want to buffer the end of the day, which may give you a more accurate end-of-day and start-of-day.


&lt;/p&gt;
&lt;p&gt;Good Luck!&lt;/p&gt;
&lt;div class="pmsig"&gt;&lt;div class="pmsig-733061"&gt;
&lt;p&gt;&lt;b&gt;"Well done is better than well said." - Benjamin Franklin&lt;/b&gt;&lt;/p&gt;

&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
1013245</field>
<field name="parent_node">
1013245</field>
</data>
</node>
