perl -T -e "$ENV{PATH}='c:\\windows'; $string='original'; $string=$1 if $ARGV[0] =~ /([a-zA-Z]+)/; system qq(notepad.exe $string) and die $!" perl -T -e "$ENV{PATH}='c:\\windows'; $string='original'; $string=$1 if $ARGV[0] =~ /([a-zA-Z]+)/; system qq(notepad.exe $string) and die $!" foo perl -T -e "$ENV{PATH}='c:\\windows'; $string=$ARGV[0]; $string =~ s/ //g; system qq(notepad.exe $string) and die $!" perl -T -e "$ENV{PATH}='c:\\windows'; $string=$ARGV[0]; $string =~ s/ //g; system qq(notepad.exe $string) and die $!" foo