Skip to content

Instantly share code, notes, and snippets.

@motemen
Last active November 11, 2016 06:34
Show Gist options
  • Save motemen/7eef3daced8ac3bef6daefef2f05d368 to your computer and use it in GitHub Desktop.
Save motemen/7eef3daced8ac3bef6daefef2f05d368 to your computer and use it in GitHub Desktop.
$] = 5.008008
$URI::VERSION = 1.71
https://www.example.com?hoge=%E3%81%BB%E3%81%92
https://www.example.com?hoge=%C3%A3%C2%81%C2%BB%C3%A3%C2%81%C2%92&foo=bar
use strict;
use warnings;
use URI;
use URI::QueryParam;
print "\$] = $]\n";
print "\$URI::VERSION = $URI::VERSION\n";
my $u = URI->new('https://www.example.com');
$u->query_param(hoge => 'ほげ');
print "$u\n";
use utf8;
$u->query_param(foo => 'bar');
print "$u\n";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment