Dear Monks

I have URLs like the following one

http://www.bing.com/cr?IG=E1B087FDC4A64C13B6B6F56EE3AA3510&CID=04F7052 +A8A496C5127170CFC8BAE6DD4&rd=1&h=mRcJ09asL7Bb7lrqFpfdvPQYVwtg1d5J6vMW +CRwXbAk&v=1&r=http%3a%2f%2fwww.raiscuola.rai.it%2farticoli%2fstato-de +lla-ricerca-scientifica-in-italia%2f19049%2fdefault.aspx&p=DevEx,5328 +.1

This, lets face it, looks pretty bad. What I want to do is to "clean" it. By cleaning I mean getting the final URL which is contained in the long one. In our case

"http://www.raiscuola.rai.it/articoli/stato-della-ricerca-scientifica- +in-italia/19049/default.aspx"

I am not an expert in URL, URI and the likes but if I put the long URL in any Browser (tried Firefox, Edge), it will "clean" it automatically showing the final (shorter and readable) URL.

Any module to achive this? I was not succesful to find any. Thanks.


In reply to Cleaning URL by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.