http://qs321.pair.com?node_id=575095


in reply to How do i interpolate a variable in a regular expression?

You should use the qr-operator:

my %config = ( URI => { regex => qr/^$method\ssip:/, sub => \&request_line }, )


see perldoc perlop