How do you save variables to a file to be read later?

So I’m wondering how to save variables like score or a custom level to a file, I’ve read up on JavaScripts ‘writing to a file’ but that just seems like a terrible idea since it all goes to one big file and you have to manually separate it, I’ve also read up on PlayerPrefs but I want something I can use to save different information to different files instead of one big PlayerPref file, I’ve heard you can use Xml files but I can’t any information about doing so

JSON is much simplier and convinient for this task.
I use LitJSON.

http://wiki.unity3d.com/index.php/SQLite

check Sqlite, you can have everything saved to a local database, it is secured compared to a file. it has Javascript support too!

And you can manage it easily.