Perl question mark syntax

Will someone explain to me what the question marks mean in the four places used in this statement?

if(m/DROP TABLE IF EXISTS \`?$tableName\`?/ || m/CREATE TABLE \`?$tableName\`?/){
           $inside=1
};
jmicorpAsked:
Who is Participating?
 
ozoConnect With a Mentor Commented:
perldoc perlre

       Quantifiers

       The following standard quantifiers are recognized:

           *      Match 0 or more times
           +      Match 1 or more times
           ?      Match 1 or 0 times
           {n}    Match exactly n times
           {n,}   Match at least n times
           {n,m}  Match at least n but not more than m times
0
 
vikaskhoriaConnect With a Mentor Commented:
The statement given by you is using a regex.
In a regex there are several meta-characters.
Like the ones specified by ozo above.

? is one of the meta-characters.

This checks 0 or 1 occurrence of the preceding character

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.