#!/usr/bin/perl use strict; my $text = 'sd(sd)sd'; my $a = quotemeta( 'sd(sd)sd' ); if ($text =~ /$a/ ) { print "yes"; } else { print "no"; }