use strict; use warnings; use URI::Escape; use Test::More tests => 2; my $foo = 'a\b'; my $have = uri_escape ($foo); my $want = 'a%5Cb'; isnt $have, $foo; is $have, $want;