Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: WWW::Mechanize follow meta refreshes

by merlyn (Sage)
on Apr 13, 2005 at 14:38 UTC ( #447422=note: print w/ replies, xml ) Need Help??


in reply to WWW::Mechanize follow meta refreshes

$mech->content() =~ /<meta http-equiv="refresh" content="0;url=([^"]*) +"/; my $url = $1;
Never never never use $1 without having tested the match. If the match fails, you're using a previous $1 from a previous successful match. Oops!

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.

Comment on Re: WWW::Mechanize follow meta refreshes
Download Code
Replies are listed 'Best First'.
Re^2: WWW::Mechanize follow meta refreshes
by simon.proctor (Vicar) on Apr 13, 2005 at 15:42 UTC
    Oops!! :).

    I have updated the node.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://447422]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (12)
As of 2016-04-29 17:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    :nehw tseb si esrever ni gnitirW







    Results (441 votes). Check out past polls.