sub do_it{ $regex .= $options; my $blah = $user_text; eval{$user_text =~ $regex}; print "User text: $user_text\n"; }