in reply to Re^2: Linux Show Permissions: traverse file access
in thread Linux Show Permissions: traverse file access
Points for pointing out that `s/// for @array` is 50% faster than `grep {} @array`.
You could also do all three s/// at the same time:
s/user::/USER:$o:/, s/group::/GROUP:$g:/, s/other::/OTHER::/ for @ +A;
For the third one, it comes at the prices of understanding the intention of the line code. But if I just don't use newlines, it might be better.
Another way to do that which may be better:
$P{$k} =~ tr/ \n\r\t\f/ /s; # remove newlines
|
|---|