Update: URI + URI::QueryParam.

#!/usr/bin/env perl use strictures; use URI; use URI::QueryParam; my $in = URI->new('http://www.bing.com/cr?IG=E1B087FDC4A64C13B6B6F56EE +3AA3510&CID=04F7052A8A496C5127170CFC8BAE6DD4&rd=1&h=mRcJ09asL7Bb7lrqF +pfdvPQYVwtg1d5J6vMWCRwXbAk&v=1&r=http%3a%2f%2fwww.raiscuola.rai.it%2f +articoli%2fstato-della-ricerca-scientifica-in-italia%2f19049%2fdefaul +t.aspx&p=DevEx,5328.1'); my $out = 'http://www.raiscuola.rai.it/articoli/stato-della-ricerca-sc +ientifica-in-italia/19049/default.aspx'; my $r = $in->query_param("r"); print $r, $/; print $out eq $r ? "Same same\n" : "No es correcto\n"; __END__ http://www.raiscuola.rai.it/articoli/stato-della-ricerca-scientifica-i +n-italia/19049/default.aspx Same same

In reply to Re: Cleaning URL by Your Mother
in thread 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.