in reply to *.opml file output to console problem
Post a sample of the input file here (so we don't have to go search an external site for it) as well as a sample of your desired output data.
Personally, I find this line:
$str = $str.$_;
More readable and easier to see the intent like this:
$str .= $_;
Also, you should use the three argument form of open:
open my $SPE, '<', 'specification.opml' or die "Can't open the damned specification.opml file! $!"; while ( <$SPE> ){ ...
One last thing... I've never used XML, but this may be a candidate for one of the many modules available from CPAN. I see esteemed members of PerlMonks frequently giving praise to XML::Twig, so it may be worth looking into. If that doesn't do the job, search CPAN for XML or perhaps even OPML.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: *.opml file output to console problem
by Anonymous Monk on May 13, 2012 at 19:05 UTC | |
by tobyink (Canon) on May 13, 2012 at 19:17 UTC | |
by Anonymous Monk on May 13, 2012 at 23:14 UTC |