#!/usr/bin/perl -wl use strict; my ($arg_1, $arg_2) = @ARGV; $_ = "apples"; my $expr = "s/".$arg_1."/".$arg_2."/"; eval $expr; print; ------- ./test.pl '\x61(.*)\x73' '\x41$1\x53' AppleS