use File::Path; use warnings::register; sub umask_mkpath { my@c; umask((umask(shift),@c=eval{mkpath(@_)} or warnings::warnif "Err:$@")[0]); @c }