in reply to Re: Tk save variables into a file and load
in thread Tk save variables into a file and load

I need help in perl Tk to save, load, default or change config variables, whenever i require. How do I approach.

One good way is to use Storable. It allows you to write an existing hash to a file, OR read the file back into a hash.

I would use Storable only for short-time data storage (i.e. temporary files that survive only for seconds up to hours) on a single machine. Here is why: Re: Perl Storable problem (i Think).

There are much better ways for long-time data storage and configuration files: Re: Accessing variables in an external hash without eval.

And for storing more than a few kBytes worth of data, perhaps across several machines, there is DBI and the various supported databases: Re^2: Perl and Database.


Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
  • Comment on Re^2: Tk save variables into a file and load