poper12 has asked for the wisdom of the Perl Monks concerning the following question:
I am trying to make this code work but with no luck. It does the xml parsing but it doesn't store the outcome in a new txt file. I could really use some help. Thank you!
#!/usr/bin/perl use XML::Simple; use Data::Dumper; $xml = new XML::Simple; $data = $xml->XMLin("news2Obama.txt"); open $fh_o, '>', 'new_output.xml' or die "can't open file: $!"; $fh_o = Dumper ($data); print $fh_o; close $fh_o or die "can't close file:$!";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: perl xml parsing
by choroba (Cardinal) on May 25, 2012 at 14:25 UTC | |
by poper12 (Initiate) on May 25, 2012 at 14:43 UTC | |
by marto (Cardinal) on May 25, 2012 at 14:49 UTC | |
by poper12 (Initiate) on May 25, 2012 at 14:56 UTC | |
by marto (Cardinal) on May 25, 2012 at 15:05 UTC | |
| |
|
Re: perl xml parsing
by toolic (Bishop) on May 25, 2012 at 14:29 UTC | |
by poper12 (Initiate) on May 25, 2012 at 14:46 UTC | |
by toolic (Bishop) on May 25, 2012 at 14:54 UTC | |
|
Re: perl xml parsing
by bitingduck (Deacon) on May 25, 2012 at 15:11 UTC |