in reply to Appending values to variable.

perl -e 'my $var = q(abc/de/f); $var =~ s/\//\\/g; print $var;'