# assuming, that /, \ and : are separators and forbidden in filenames $name = ~ m{ ( [^/\\:]+ )$ }x;