I came across this regexp in a Perl script:
$parent_file =~ s@^\Q$CurrentWorkDirForFile\E/@@
The current working directory is populated with cwd.
Can anyone please explain what this entry is?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In perl, you can use (almost) any character to delimit a regex. So this is equivalent to
s/^\Q$CurrentWorkDirForFile\E///. The\Qand\Edisable/enable the interpretation of special pattern metacharacters. So, for example,/\Q+\E/will match a literal plus even though+is a special character in regexps.