drodinthe559 has asked for the wisdom of the Perl Monks concerning the following question:
Thanks, Dave#!/usr/bin/perl -w use strict; use File::Glob; use XML::Simple; open DIPFILE, ">> C:/director/DIPFILE.TXT"; open LOGFILE, ">> C:/director/DIPLOG.LOG"; #Pull in all the xml files for each report. my @dipfile = glob('C:/director/*.xml'); foreach my $x (@dipfile) { my $ref = XML::Simple::XMLin($x); print '"' . $x . '","' . $ref->{defaultName} . '","' . $ref->{defa +ultDescription} . '","' . $ref->{reportExecutionTime} . '"' . "\n"; printf DIPFILE '"' . $x . '","' . $ref->{defaultName} . '","' . $r +ef->{defaultDescription} . '","' . $ref->{reportExecutionTime} . '"' +. "\n"; printf LOGFILE '"' . $x . '","' . $ref->{defaultName} . '","' . $r +ef->{defaultDescription} . '","' . $ref->{reportExecutionTime} . '"' +. "\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Reading XML File Hash in text
by Your Mother (Archbishop) on May 22, 2009 at 22:33 UTC | |
by drodinthe559 (Monk) on May 22, 2009 at 22:49 UTC | |
|
Re: Reading XML File Hash in text
by juster (Friar) on May 23, 2009 at 05:13 UTC | |
by drodinthe559 (Monk) on May 26, 2009 at 20:11 UTC | |
|
Re: Reading XML File Hash in text
by Anonymous Monk on May 22, 2009 at 23:00 UTC |