#!/usr/bin/perl use strict; use warnings; my $variable = 'a b'; $variable =~ s/a/vd/g; $variable =~ s/b/ff/g; print $variable . "\n";