perl -le '$_="abc";/b/;print $'\' | ^--- the single quote part of $' +--- the dollar part of $'