in reply to Breaking file path into segments
use Path::Class; print join "#", dir("abc/def/ghi")->components; [download]