Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
and i only want to join on every other element. In other words, I want I string that looks like: 'USD_Equity_USA'. Can anyone come up with something better than@array=('Currency','USD','Asset','Equity','Country','USA');
thanks, Michaelfor (my $i=0; $i<@array; $i+=2) { $desc .= "$array->[$i+1]_"; } chop($desc);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: selective join
by dws (Chancellor) on Sep 24, 2003 at 17:00 UTC | |
by shenme (Priest) on Sep 24, 2003 at 17:17 UTC | |
|
Re: selective join
by BrowserUk (Patriarch) on Sep 24, 2003 at 15:52 UTC | |
|
Re: selective join
by blokhead (Monsignor) on Sep 24, 2003 at 15:58 UTC | |
|
Re: selective join
by dragonchild (Archbishop) on Sep 24, 2003 at 15:59 UTC | |
by sweetblood (Prior) on Sep 24, 2003 at 17:20 UTC | |
|
Re: selective join
by Abigail-II (Bishop) on Sep 24, 2003 at 16:08 UTC | |
|
Re: selective join
by Limbic~Region (Chancellor) on Sep 24, 2003 at 15:48 UTC |