in reply to Replace an asterisk '*" with the content of array
but this will just replace the '*' and dump the array but not what I want. Can someone help me here please.
So what should it do instead?
Start with this program
#!/usr/bin/perl -- use strict; use warnings; my @finalnwlist = "192.169.32.0/255.255.255.0"; my @lines = "/file1 *(rw,sync,no_root_squash,no_subtree_check)"; foreach(@lines) { $_ =~ s/\*/@finalnwlist/g; print "$_\n"; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Replace an asterisk '*" with the content of array
by deep27ak (Novice) on Sep 18, 2015 at 10:41 UTC | |
by poj (Abbot) on Sep 18, 2015 at 11:21 UTC | |
by Anonymous Monk on Sep 18, 2015 at 10:44 UTC | |
by Anonymous Monk on Sep 18, 2015 at 10:50 UTC | |
by Anonymous Monk on Sep 18, 2015 at 11:01 UTC | |
by deep27ak (Novice) on Sep 19, 2015 at 05:54 UTC |