title: How can I check if a regex pattern is valid in Perl?
body: <p>Firstly, I was wondering if there was some kind of built in function that would check to see if a regex pattern was valid or not. I don't want to check to see if the expression works - I simply want to check it to make sure that the syntax of the pattern is valid - if that's possible. </p>
  
  <p>If there is no built in function to do so, how do I do it on my own? Do I even need to? </p>
  
  <p>Is there a directory of built in functions/modules that I can search so I can avoid more questions like this? Thank you. </p>
  
  <p>EDIT: I should mention that I plan on generating these patterns on the fly based on user input - which is why I'd like to validate them to make sure they will actually run. </p>