The $^O stuff is to distinguish DOS vs Unix path separators (backslash vs slash).That may be it's purpose, but in fact it is having no effect at all. First the code tries removing everything through the last backslash; if there was no backslash it tries removing everything through the last slash. I still can't tell if the $^O part is intentional obfu or just a typo.
In reply to Re^2: Funny code (not amused)
by ysth
in thread Funny code
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |