http://www.perlmonks.org?node_id=993666


in reply to How to seperate directory and file

G'day Divakar,

The built-in module File::Spec has a number of functions for manipulating pathnames: splitpath() would be the one to use here.

-- Ken