Modified perl a bit more

Starting to deal with poorly formatted entries