in reply to why spaces! XML::DOM
It seems as if each element in the array @list contains two newline characters after them. You can remove them with a loop
my $element $element = substr $element, 0, -4 foreach $element @list; #You will still need to add the space though. #This solution is not that plausible.
Also, I do not think the else {} part of your code is needed. If the condition is met, the program will die, ergo no need for an else.
Update: Just realized this could also be done with a substitute function:
$element =~ s/\\n\\n/ /;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: why spaces! XML::DOM
by pjotrik (Friar) on Jul 10, 2008 at 10:16 UTC | |
by Lawliet (Curate) on Jul 10, 2008 at 10:31 UTC |