in reply to I wan't take undef for an answer

perlre states:

$ Match the end of the line (or before newline at the end)
On *nix, \x0A is the same as \n. On windows, \r\n is translated to \n by the underlying C libraries, so \n works on both platforms. Remember that [A-G]* will match zero or more A-G's. I'd probably change * to +.