SpacemanSpiff has asked for the wisdom of the Perl Monks concerning the following question:
This worked great until I ran into a post where the link had special characters: "eBay item 380565801 (Ends Jul-09-02 144739 PDT) -" When the script sees this, it dies out with the following error:$mech->find_link( text => "$PrevMsgLink"); my $topic_obj = $mech->find_link (text_regex => qr/$PrevMsgLink/i ); my $PrevMsg = $topic_obj->url;
"Can't call method "url" on an undefined value at C:\Documents and Settings\Tony\Desktop\Perl\....."
So the question is, what can I do to get the script to find links with special characters? I've searched the site here, and read the manpages for the applicable modules and come up with nothing. I'll admit, I'm still a novice at all of this, and have looked right past my own answers before. Be gentle.
Thanks much in advance! tony
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How can I handle special characters in mech->find_link
by Corion (Patriarch) on Jun 12, 2006 at 07:49 UTC | |
by SpacemanSpiff (Sexton) on Jun 12, 2006 at 08:17 UTC | |
|
Re: How can I handle special characters in mech->find_link
by Joost (Canon) on Jun 12, 2006 at 07:52 UTC |