in reply to Re: Reading/Parsing an XML file using Perl
in thread Reading/Parsing an XML file using Perl

Hi,

Thank you it is working and trying how can I read multiple files from a path instead of a single file and generate an out file instead of just printing at the command line.

  • Comment on Re^2: Reading/Parsing an XML file using Perl

Replies are listed 'Best First'.
Re^3: Reading/Parsing an XML file using Perl
by 7stud (Deacon) on Sep 17, 2010 at 06:26 UTC

    1)

    toolic posted:

    You can get a list of XML files in a directory using glob. Then, loop over those files

    2)
    use strict; use warnings; use 5.010; open my $OUTFILE, '>', 'data.txt' or die "Couldn't open data.txt: $!"; for (1 .. 10) { say {$OUTFILE} 'hello world'; } close $OUTFILE;