In order to evaluate the replacement as code, you have to use the /e modifier:
#!/usr/bin/perl
use warnings;
use strict;
use utf8;
my $from = qr/йц(\W)/;
my $to = '"фы$1"';
my $string = 'йц,';
$string =~ s/$from/$to/ee;
binmode STDOUT, 'utf8';
print $string, "\n";