Home: General Discussions: General Questions:
Caching the value of a variable



aditya.chandra
New User

Jul 1, 2009, 9:33 PM


Views: 10640
Caching the value of a variable

Hi,

I have a perl script which calls a perl module. There is a variable in the perl module. I want this variable to retain its value when the script call the module next time.

Can someone help me regarding the same?


KevinR
Veteran


Jul 1, 2009, 9:41 PM


Views: 10639
Re: [aditya.chandra] Caching the value of a variable

Then you have to store the value to disk. How you store it is up to you, text file, database, maybe using Storable module.
-------------------------------------------------


aditya.chandra
New User

Jul 1, 2009, 9:57 PM


Views: 10638
Re: [KevinR] Caching the value of a variable

Hi Kevin,

The variable's value couldn't be stored in a file or in database as the variable will contain password.

Thanks,

Aditya


KevinR
Veteran


Jul 2, 2009, 11:21 AM


Views: 10628
Re: [aditya.chandra] Caching the value of a variable

Well, I have no idea how you can save the value of a variable without storing it somehow. You could store it in an encrypted form. But that is getting out of my range of knowledge.
-------------------------------------------------