#!/usr/bin/perl use strict; use warnings; my $str = "%E5%B0%8F%E9%A3%BC%E5%BC%BE"; $str =~ s/%([0-9A-Fa-f][0-9A-Fa-f])/chr hex $1/eg; print $str;