in reply to split "/" out of path
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
|
|---|