Is it possible to pass a variable to a new value using Config::Tiny?
I have a form that passes a value to a perl script. The value is called $newvalue. If I print the value its fine. However none of the following work to update the config file with that value:
use strict; use warnings; use diagnostics; use Config::Tiny; use CGI qw(param header); my $Config = Config::Tiny->new; $Config = Config::Tiny->read( 'file.conf' ); my $newvalue = param('newvalue'); chomp $newvalue; $Config->{section}->{ipaddress} = "\$newvalue"; #OR #$Config->{section}->{ipaddress} = \$newvalue; #OR #$Config->{section}->{ipaddress} = $newvalue; #OR #$Config->{section}->{ipaddress} = "$newvalue"; $Config->write( 'file.conf' ); print "Content-type: text/html\n\n"; print $newvalue; print <<ENDHTML
Has anyone any ideas?
In reply to Config::Tiny Module by packetstormer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |