http://qs321.pair.com?node_id=80207

psmail has asked for the wisdom of the Perl Monks concerning the following question: (strings)

I need to separate the filename and path from a string. e.g.
$a = "/root/subroot/subsubroot/filename"; I want to separate filename and the path. i.e. The output should be $b = "/root/subroot/subsubroot/" $c = "filename"
Thanks

Originally posted as a Categorized Question.