sub get_regexp { if ($blah) $regexp = qr {}; elsif ($blahblah) $regexp = qr {}; }