Erodible perforated coated matrix for extended release of drugs