my $q = CGI->new; my $fqdn = $q->param('fqdn'); my $address = $q->param('address'); my @newlines; foreach(@lines) { $_ =~ s/RECORDNAME/$fqdn/ee; $_ =~ s/RECORDIP/$address/ee; push(@newlines,$_); } open(FILE, ">ADDACS1.csv") || die "File not found"; print FILE @newlines; close(FILE);
In reply to search and replace with a variable by tronmason
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |