my $hexdigit = '[0-9a-fA-F]'; my $ebayname = "olruebe%21"; $ebayname =~ s!%($hexdigit$hexdigit)!chr(hex($1))!ge; print $ebayname;