Aug 15, 2012, 9:02 AM
Post #4 of 4
Those errors mean that you need to declare the vars, which is done with the 'my' keyword like you did on the other vars.
Re: [appetitto] Cannot update record in file with Dump module
[In reply to]
So, if I understand correctly, your data file is a config file containing vars that you need to use in the script. If so, then instead of reading in the file and using eval like that, you can load the file with a require or do statement.
However, a much better solution would be to use a standard config file and parse that file rather than executing code via eval. There are many config parser modules on cpan which make this task very easy and safe. Using eval like that is very insecure and dangerous.