redid embedded perl, corrected escaped variables