in reply to Difference between $1 and \1.

$ perl -we " /(a)$1/ " Use of uninitialized value $1 in regexp compilation at -e line 1. Use of uninitialized value $_ in pattern match (m//) at -e line 1.
Basic debugging checklist, Tutorials: Use strict and warnings, Why you should use strict, diagnostics/Use strict warnings and diagnostics or die