[perl] Efficient processing of large text
- by jesper
I have text file that contains over one million urls. I have to process this file in order to assign urls to groups, based on host address:
{
'http://www.ex1.com' = ['http://www.ex1.com/...', 'http://www.ex1.com/...', ...],
'http://www.ex2.com' = ['http://www.ex2.com/...', 'http://www.ex2.com/...', ...]
}
My current basic solution takes…