title: Scrape Url and use that for LWP Perl
body: <p>Ok so i know how to make an LWP get request with Perl in a loop. But i would like to know if its possible to scrape an Url from a website and automaticly put that in the url to visit in loop also??</p>
  
  <pre><code>#!usr/bin/perl
  
  for ($i=0;$i&lt;200;$i++)
  {
  
  use strict;
   use LWP::UserAgent;
  use warnings;
   my $ua = new LWP::UserAgent(agent =&gt; 'USER AGENT');
   my $response = $ua-&gt;get("http://example.com");
   print $response-&gt;code,' ', $response-&gt;message,"\n";
  
  sleep 2;
  
  }
  </code></pre>
  
  <p>So now i would like to scrape an url from a domain and use that for the example.com and also that it scrapes every visit a new url.</p>