It checks to see if the place string begins with a period . .
Consider this:
p ('.foo' =~ /^\./) == 0
In this case, there is no need to use == 0 . place =~ /^\./ would be sufficient as a condition:
p '.foo' =~ /^\./
EDIT: /^\./ is a regular expression. The leading and trailing slashes mean that this is a regular expression, leaving an important bit ^\. . The first character ^ marks "start of line / line" and \. is a literal symbol . because the period character is usually considered a special character in regular expressions.
For more information on regular expressions, see Wikipedia or the excellent regular-expressions.info website.
vonconrad
source share