See
Re: chooseDirectory set Default. You have to watch out for someone hitting control-c, etc. to make sure your data gets saved. Also, you need to read in your data somehow. Saving to data can be tricky, one mistake and you can wipe out your script.
Inline::Files is probably the better way to go.