in reply to Regex Start Anchor with variables

You probably don't need a regular expression for this:
if ( 0 == index $str1, $str2 ) { print "match\n"; } else { print "nomatch\n"; }
However, if you really want to use a regular expression then you need to escape the meta-characters in $str2:
if( $str1 =~ /^\Q$str2/ ) { print "match\n"; } else { print "nomatch\n"; }