in reply to Re^2: Abbreviation regex?
in thread Abbreviation regex?

The injection attack (and the bug preventing the use of special characters) is fixed by simply adding \Q!
if ( "abbreviation" =~ m/^\Q$str/ ) { #...