$ perl -e' use v5.14; use URI qw( ); my $uri = URI->new( "https://example.com/a+b?c+d=e+f" ); say for $uri->path, $uri->query_form; ' /a+b c d e f