Once your code is using AnyData, you can change back and forth between any of the supported file formats without changing your code.
Migration to SQL is made very easy.
The DBD::AnyData module gives you SQL access to any flat file supported by AnyData.
You can start writing your SQL a little at a time. Once all of your code is using SQL, you just need to migrate all of your flat file data into a database and change your DSN.