my $ext='c'; qx("perl -p -i.bak -e \"s/(\\\@Filetyp\\s*?:)/\\1$ext/\" ./path/test.c"); # ^^