Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: Tk save variables into a file and load

by afoken (Canon)
on Sep 15, 2018 at 20:38 UTC ( #1222451=note: print w/replies, xml ) Need Help??


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.

Alexander

--
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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1222451]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (7)
As of 2019-12-08 19:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?