On Mon, Apr 14, 2008 at 6:45 AM, Jim <[EMAIL PROTECTED]> wrote:
snip
>  How would I retrieve all the URLs in $response->content instead of
>  just the first one?
>
>  if($response->content =~ m/http:(.*?).mp3"/)
>  {
>                 $url = "http:" . $1 . ".mp3";
>
>  }
snip

Try

my @mp3 = $response->content =~ m{"(http://.*?.mp3)"}g;

You can read more about regexes here
http://perldoc.perl.org/perlretut.html
http://perldoc.perl.org/perlre.html
http://perldoc.perl.org/perlop.html
http://perldoc.perl.org/perlreref

You might also consider using an XML parser instead of regexes.

-- 
Chas. Owens
wonkden.net
The most important skill a programmer can have is the ability to read.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to