#!/usr/bin/perl binmode(STDIN, ":utf8"); binmode(STDOUT, ":utf8"); # , to __101__ and vice versa # / to __102__ and vice versa while ($line = <>) { utf8::decode($line); $line =~s/__101__/,/g; # convert __101__ number to comma (inside number) $line =~s/zस्लस्ह्/zslash/g; $line =~s/zslash/\//g; # convert __102__ number to slash print $line; }