http://www.perlmonks.org?node_id=827261


in reply to Reaped: capturing name of deepest directory in a tree structure.

It was already posted and answered right here.

s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/