We are planning a trip from Perpignan France to Barcelona. We are thinking of taking a train and stopping north of Barcelona to visit the Dali museum. Is there a train from Perpignan
yeah there is a train no problem it only take half an hour to the Figueras -Valiant stop and then walk a mile
https://www.thetrainline.com/?redirected=true
If you want to stop off in Figueres, there doesn't appear to be luggage storage at the Figueres-Vilafant station where the high-speed trains stop, or at the traditional station. I don't know if there's anywhere else in the town - would be worth asking on the Spain board. Otherwise, if you have heavy luggage, it might be better to visit Figueres as a day trip from Barcelona during your stay. The other issue is that if you buy a cheap advance fare you can't stop off along the way for a random length of time, you'd need to pick specific trains to travel on.
rome2rio.com is a great website that shows how to get from anywhere, to anywhere, by all means available. It's indispensable when planning travel.
No problem to take a train between Perpignan and Barcelona ! Just pay attention to the schedules if you go there in winter !
Another possibility is to stay on the train past Figueres to Girona, and stay there as your base for a couple of nights. Girona is an attractive mediaeval city with historic sites and fine restaurants. You could take a local train back to Figueres, about a 30-minute ride, for a half-day visit, with no worries about luggage.
http://www.girona.cat/turisme/eng/
The bus station in Figueres has luggage storage (and it's close to the DOWNTOWN train station). We ended up at the Vilafant station accidentally and I would not do that again. I would prefer to take a slower train and end up closer to the action.