Light never found out L's name. Instead, Rem used his shinigami eyes to find out L's name and subsequently kills him by writing his name in the note.