title: How can I extract URLs from plain text in Perl?
body: <p>I've seen some posts like this, but not exactly what I want to do.</p>
  
  <p>How can I extract and delete URL links, and then remove them from plain text.</p>
  
  <p>Example:</p>
  
  <pre><code>"Hello!!, I love http://www.google.es".
  </code></pre>
  
  <p>I want extract the "http://www.google.es", save it on a variable, and then, remove it from my text.</p>
  
  <p>Finally, the text has to be like that:</p>
  
  <pre><code>"Hello!!, I love".
  </code></pre>
  
  <p>The URLs usually are the last "word" of the text, but not always.</p>