RosettaCodeData/Task/URL-decoding/Perl-6/url-decoding-1.pl6

6 lines
132 B
Raku
Raw Permalink Normal View History

2013-04-11 01:07:29 -07:00
my $url = "http%3A%2F%2Ffoo%20bar%2F";
say $url.subst: :g,
/'%'(<:hexdigit>**2)/,
-> ($ord ) { chr(:16(~$ord)) }