use strict; use warnings; use JSON; use LWP::UserAgent; use utf8; #Due to some security reasons I am not mentioning the url,hope u understand my $ResRef = sendHTTPRequest($someurlRequest); my $string = $ResRef->decoded_content;#I used json decode to decode content my $string = transalte_replace($string); sub transalte_replace { my $string = shift; for($string) { s/\\u[0-9]+/1-/g; s/\\u[a-zA-Z0-9\+]*/2-/g; s/\\x\{[a-zA-Z0-9]*\}/3-/g; s/[^\p{ASCII}]/-/g; s/[^\u0000-\u007F]+/replace1/g; s/[^\x00-\x7F]+/rep/g; s/[^\p{ASCII}]/-/g; s/[^A-Za-z0-9\.,\?'""!@#\$%\^&\*\(\)-_=\+;:\<\>\/\\\|\}\{\[\]`\~]+/y/g; #s/[£]//g; s/[^\x20-\x7E]+/replace3/g; #s/\\u[0-9]+/2-/g; #s/\\x[a-z0-9]+/3-/g; #s/[^\x00-\x7F]/4-/g; } }