Yes, you have to be early with your reservations - the window opens three months before the trip and the special-price tickets go fast, but the ticket office staff (people, not computers) at Perpignan station are amazingly helpful and work out the reductions and discounts.
Brilliant, but let's now factor in the additional 2.5 hours to drive up to Perpignan station, queue for the helpful people at the guichet and drive back again.
On the other hand it
is old news that the the TGV is damaging all French domestic air travel. Look at what happened to Air Littoral, so I'm not sure that this is anything especially to do with Ryanair, it's more a plug for SNCF.
This train travel thing will become a lot more convincing when you can book, say, Girona - Glasgow direct, on a single website.
Meanwhile it's horses for courses.