1) You should put the data in a separate file from your source code.
2) You can't ask Perl to automatically update your variables when your data file changes. You have to do it by hand, perhaps on-demand or by checking the file's last-modified time on a regular basis.