i'm looking for a sub that split the drive, path, filenename and extension from a complete pathname like the C function splitpath . i use the code above, but it won't work if the pathname had no extension or if there's no drive given.
$_ =~ /(.*:)(.*\/)(.*)(\..*)/;
return ($1, $2, $3, $4);