in reply to Re^4: part - split up files according to column value
in thread part - split up files according to column value

I read the FileHandleFileCache documentation differently than you do. I think that you're basically supposed to replace your calls to open by calls to cacheout, that is, instead of open $file{$key}{fh}, ..., use:

$file{$key}{fh} = cacheout $file{$key}{name}

But I haven't tested that. $path is the (path and) name of the output file, and $mode is the file mode (which is irrelevant to your needs).

Update: kyle spotted a link to the wrong documentation.