Update datagenerator.pl

Adding final working version of the script. This script could do with lots of refactoring. Maybe later. Probably never. It's not broke. Don't fix it. If modification needed will refactor.