Jim wrote:
> Hi all,
> 
> I have some code (below) that retrieves an URL from $response-
>> content. $response->content contains an RSS a retrieved RSS file.
> 
> 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";
> 
> }

my @files = $text =~ /http:(.*?).mp3"/g;

will do what you describe, but why not capture the entire URL instead of
capturing just part of it and replacing the missing pieces:

my @files = $text =~ m#(http://.*?.mp3)"#g;

HTH,

Rob



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


Reply via email to