Points for pointing out that `s/// for @array` is 50% faster than `grep {} @array`.
Points for telling me about `(?s:.*)` I did not know it could be written that way. It seems to be as fast as the other method (2% slightly faster), and might be more readable.
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.
# perl -E '$x="abc\ndef"; $x=~s/.*/u/mi; say $x' u def # perl -E '$x="abc\ndef"; $x=~s/[\s\S]*/u/mi; say $x' u # perl -E '$x="abc\ndef"; $x=~s/(?s:.*)/u/mi; say $x' u
Will test this one in the field for a while.
In reply to Re^2: Linux Show Permissions: traverse file access
by FreeBeerReekingMonk
in thread Linux Show Permissions: traverse file access
by FreeBeerReekingMonk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |