Simple way: m! ([^/]+) \z!x;, and the $1 will contain what you want. However, this is not crossplatform and you never know what sort of subtle problems it will cause. For a less fragile solution, look at File::Spec->splitdir.
----
: () { :|:& };:
Note: All code is untested, unless otherwise stated
In reply to Re: split "/" out of path
by hardburn
in thread split "/" out of path
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |