Added perl script to find maximal substrings in O(n^3) time