$ perl -wle'use re "debug"; $x = "foo\nbar"; qr/hullo #there $x/x' Compiling REx `hullo #there $x' size 4 Got 36 bytes for offset annotations. first at 1 1: EXACT (4) 4: END(0) anchored `hullo' at 0 (checking anchored isall) minlen 5 Offsets: [4] 1[15] 0[0] 0[0] 16[0] Name "main::x" used only once: possible typo at -e line 1. Freeing REx: `"hullo #there $x"'