in reply to How do I escape special characters like . / or | in a regular expression?
$filename=~/.*\.txt$/ # matches anything ending with .txt; [download]