S
Saya
Hi,
I need help/hints to accomplish the following.
Assume I have a varible $x looking something like this:
$x = "test test <a href="www.google.com">google</a> and some more text
here <a href="www.perl.com">perl</a>"
Now I use HTML::LinkExtor to find the a hrefs and call a replace
function:
$p = HTML::LinkExtor->new(\&replaceURL, "");
$p->parse($x);
The replaceURL function contains an array @safeLinkArr, consisting of
hrefs that need not to be done anything to. For instance lets say that
www.perl.com is a safe href so therefore it does not need anything
"done" to it.
How can I best run through the values in the hash against the values
in the safeLinkArr ? Is there a way I can say something like "in" and
make the comparison that way or how should the foreach or for loops
look like ???
Thx for any help provided
/Saya
/
I need help/hints to accomplish the following.
Assume I have a varible $x looking something like this:
$x = "test test <a href="www.google.com">google</a> and some more text
here <a href="www.perl.com">perl</a>"
Now I use HTML::LinkExtor to find the a hrefs and call a replace
function:
$p = HTML::LinkExtor->new(\&replaceURL, "");
$p->parse($x);
The replaceURL function contains an array @safeLinkArr, consisting of
hrefs that need not to be done anything to. For instance lets say that
www.perl.com is a safe href so therefore it does not need anything
"done" to it.
How can I best run through the values in the hash against the values
in the safeLinkArr ? Is there a way I can say something like "in" and
make the comparison that way or how should the foreach or for loops
look like ???
Thx for any help provided
/Saya
/