kluther has asked for the wisdom of the Perl Monks concerning the following question:

The problem:
Find pieces of text in a file enclosed by `@` and replace the inside
@abc@ abc @ABC@
cba @cba CBA@

Deisred output:
абц abc АБЦ
cba цба ЦБА

I have the following:
#!/usr/bin/perl use strict; use warnings; use Encode; my $output; open FILE,"<", 'test.txt'; while (<FILE>) { chomp(my @chars = split(//, $_)); for (@chars) { my @char; $_ =~ s/a/chr(0x430)/eg; $_ =~ s/b/chr(0x431)/eg; $_ =~ s/c/chr(0x446)/eg; $_ =~ s/d/chr(0x434)/eg; $_ =~ s/e/chr(0x435)/eg; $_ =~ s/A/chr(0x410)/eg; $_ =~ s/B/chr(0x411)/eg; $_ =~ s/C/chr(0x426)/eg; push @char, $_; $output = join "", @char; print encode("utf-8",$output);} print "\n"; } close FILE;
But I'm stuck on how to process further
Thanks for help in advance!