mightycare has asked for the wisdom of the Perl Monks concerning the following question:
from on array like this :#{#string#10.0.0.1#;#string#10.0.0.2#;#string#10.0.0.3#}# and so forth +.
I do it this way, but ,aybe there is some better solution :-)my @dnsSuffixList=('10.0.0.1', '10.0.0.2', ... );
Thanks in advance, Stephanmy @dnsSuffixList = qw ( 10.0.0.1 10.0.02 10.0.03 10.0.04 ); my $str = join ('#;#string#', @dnsSuffixList); $str =~ s/$str/#{#string#$str#}#/; # print $str;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Array / String
by moritz (Cardinal) on Oct 12, 2011 at 10:22 UTC | |
by mightycare (Initiate) on Oct 12, 2011 at 10:36 UTC | |
by moritz (Cardinal) on Oct 12, 2011 at 11:53 UTC | |
|
Re: Array / String
by RichardK (Parson) on Oct 12, 2011 at 12:23 UTC |