in reply to remove lines from file ending with / char
/foo/bar/ /foo/bar/baz [download]
grep { 0 != index reverse($_), '/' } @files [download]
grep !m{/$}, @files [download]