in reply to Basic regular expressions
1. This code is just looking for any number of backslashesNo, the backslash works as an escape character. You're matching for a literal "*".if ($var ~= m/\*/)
2. This code is matching for a backslash but what does the $ meanNo. The backslashs works as an escape character again. '$' means 'match at end of string' (you seem to know the meaning of $ in your next question, though). So this matches against a forward slash at the end of $path.unless($path ~= m/\/$/)
3. This code is replacing . gz at the end of a string. with nothingCorrect.$output ~= s/\.gz$//;
You're welcome.
|
|---|