<?xml version="1.0" encoding="windows-1252"?>
<node id="1015409" title="Re^4: Copy rows of file to new document" created="2013-01-25 16:32:02" updated="2013-01-25 16:32:02">
<type id="11">
note</type>
<author id="1004927">
phineas629</author>
<data>
<field name="doctext">
&lt;p&gt; I've given this a couple attempts.I'm really trying to read over the notes but am just plain lost.
This is the error I got with the code:
&lt;/p&gt;
&lt;p&gt;
"my" variable $dir_path masks earlier declaration in same statement at parse.pl
line 5.
syntax error at parse.pl line 5, near "opendir"
Can't use global $! in "my" at parse.pl line 5, near "die $!"
syntax error at parse.pl line 7, near ") {"
Global symbol "$file_content" requires explicit package name at parse.pl line 8.

Execution of parse.pl aborted due to compilation errors.

&lt;/p&gt;


&lt;code&gt;
#!/usr/bin/perl
use strict; 
use warnings; 
my $dir_path="c:/incoming/temp;" 
opendir my $DIR, $dir_path or die $!;
open my $OUT, '&gt;&gt;', 'c:/vehicles.txt' or die $!;
while (my $file_name = readdir($DIR) {print "$file_name\n";}
print MYFILE $file_content;
close (MYFILE)

&lt;/code&gt;</field>
<field name="root_node">
1015083</field>
<field name="parent_node">
1015295</field>
</data>
</node>
