It works for me. What did you try and how did it fail for you?
See perlre for the various ways of how to quote characters in regular expressions.
perl -le "for (@ARGV) { printf qq('$_' does %s end with a backslash\n) +, /\\$/ ? '' : 'not'}" c:\ c:\foo
In reply to Re: Check last character of a string
by Corion
in thread Check last character of a string
by theroninwins
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |