my %config = ( CONFIG_PCI => 'y', CONFIG_BSD_PROCESS_ACCT => 'y', ); while (<>) { if ((my ($n,v) = split/=/) == 2) { if (my $new_value = $config{$n}) { print "$n=$new_value\n"; next; } } print; }
In reply to Re: editing options in a file
by Joost
in thread editing options in a file
by rjsaulakh
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |