1 2 3
use File::Basename; print basename("/hello/foo.txt"); print dirname("/hello/foo.txt");
1
foo.txt/hello