cnarun86 has asked for the wisdom of the Perl Monks concerning the following question:
I want to change the value of the global variable of the perl module in the .pm file itself(permanently). How can I change the value using program (without using file operations).Here is the example code.
package pkgname; our $var1 = 'value1';
After changing the value1 to value2. It should look like this
package pkgname; our $var1 = 'value2';
I tried using methods it changes in the runtime. After execution I opened the file and saw $var1 doesn't change in the pm file. Is there any other way to do this without using file operations?
Expecting your blessing,
Arun Kumar C.N
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Changing a variable in perl module
by JavaFan (Canon) on Mar 04, 2009 at 12:51 UTC | |
|
Re: Changing a variable in perl module
by ELISHEVA (Prior) on Mar 04, 2009 at 12:28 UTC | |
|
Re: Changing a variable in perl module
by cdarke (Prior) on Mar 04, 2009 at 12:34 UTC | |
|
Re: Changing a variable in perl module
by targetsmart (Curate) on Mar 04, 2009 at 14:24 UTC | |
|
Re: Changing a variable in perl module
by Anonymous Monk on Mar 04, 2009 at 12:27 UTC |