in reply to Array / String
Use join, and stick the first and last delimiter to the ends manually.
Something like:
my $result = '#(#string#' . join('#;#string#', @array) . '#)#;
Or a bit prettier:
my $result = sprintf '#(#string#%s#)#',join('#;#string#', @array);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Array / String
by mightycare (Initiate) on Oct 12, 2011 at 10:36 UTC | |
by moritz (Cardinal) on Oct 12, 2011 at 11:53 UTC |