in reply to Loop will not save into the array
I fancy that converting your code from
Well, I would probably rewrite this using regular expression:
to$stripped_html[$x] = join(" ",split " ",$stripped_html[$x]);
will do the trick. The reason being that if you have more than one white spaces, say, n, the split will generate n-1 undef's in the array, thus the warning.$stripped_html[$x] = join(" ",split(/\s+/,$stripped_html[$x]));
Well, I would probably rewrite this using regular expression:
$stripped_html[$x] =~ s/\s+/ /g;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Loop will not save into the array
by graff (Chancellor) on Aug 18, 2005 at 05:05 UTC | |
Re^2: Loop will not save into the array
by lampros21_7 (Scribe) on Aug 17, 2005 at 12:22 UTC | |
by Roger (Parson) on Aug 17, 2005 at 12:46 UTC | |
by lampros21_7 (Scribe) on Aug 17, 2005 at 13:51 UTC |
In Section
Seekers of Perl Wisdom