in reply to is this a regexp question ?
You can factor out bits of a regular expression, and pre-compile them using the qr() operator:
my $H = qr{abjdk|adfkj}; if ($thisstring =~ $H) { # do stuff } [download]