use strict; use warnings; use URI::Escape; use Test::More tests => 1; my $user = 'prod\user'; my $have = uri_escape ("${user}:"); my $want = 'prod%5Cuser%3A'; is $have, $want;