I had the same requirement and ended up using Roger's method except  
with an array of arrays:
[['abcd0001.txt', 'abcd0001.bak.txt'],['abcd0003'], etc.]

On Jul 18, 2009, at 5:39 PM, Roger Pack wrote:

>
>> Perhaps nested hashes.
>
> Oops I meant hashes of arrays, i.e. final data structure:
>
> {'abcd0001' => ['abcd0001.txt', 'abcd0001.bak.txt'], 'abcd0003' =>
> ['abcd0003']}
>
> then iterate through looking for arrays with length 1 only.
> GL.
> =r
> filename['
> -- 
> Posted via http://www.ruby-forum.com/.
>