in reply to Directory traversal backwards

Untested!
use strict; use warnings; my @path= split /\//,'/abc/def/ghi/jkl'; my $currentpath= undef; while ($#path) { $currentpath= join '/',@path # your setfacl here last if -r $currentpath; $currentpath= undef; pop @path; } die "Couldn't setfacl" unless $currentpath;
Update Thanks Grandfather for pointing me to the "it" instead of "if"

s$$([},&%#}/&/]+}%&{})*;#$&&s&&$^X.($'^"%]=\&(|?*{%
+.+=%;.#_}\&"^"-+%*).}%:##%}={~=~:.")&e&&s""`$''`"e