I apologise for not writing it more clear, was all bunched up in my head. What I meant was file 1 is where everything happens and file 2 is just a file where it holds the user, password, and stage level. So when I login while running file 1, it gets the information from file 2. And when I save in file 1, it saves any changes in file 2.
Sure, keeping your perl code and application data in separate files is common practice. You could even store this data in a database, for example DBD::SQLite.