<?xml version="1.0" encoding="windows-1252"?>
<node id="671583" title="Re: need help on declaring variables" created="2008-03-03 01:48:40" updated="2008-03-02 20:48:40">
<type id="11">
note</type>
<author id="409485">
Thilosophy</author>
<data>
<field name="doctext">
&lt;i&gt;but it gave me some error&lt;/i&gt;

&lt;p&gt;Hmm. Did it give you an error message to go along with the error? 

&lt;p&gt;&lt;i&gt;The error seems to stem from here:&lt;/i&gt;

&lt;code&gt;
    my $dt = $Strp-&gt;parse_datetime($1);
    my $timestamp = $dt -&gt;epoch();
    my $refs = $2;
&lt;/code&gt;

You suspect $1 and $2. Do they contain the value you think they should (add some debug output)? 
When using regular expressions, you should check if there actually was a match.

</field>
<field name="root_node">
671582</field>
<field name="parent_node">
671582</field>
</data>
</node>
