neversaint has asked for the wisdom of the Perl Monks concerning the following question:
Other example:my $arref1 = [ 'foo bar quux bam', 'foi bir quix bim', 'foe ber quex bem', 'foa bor quax bom',]; my $inst1 = '4 A -4 C -4 B 2 D'; # intended result my @result1 = ( 'foo -4 bar -4 quux 2 bam', 'foi -4 bir -4 quix 2 bim', 'foe -4 bar -4 quex 2 bem', 'foa -4 bor -4 quax 2 bom', );
I really don't know how to go about it. Please kindly advice.my $arref2 = [ 'foo bam', 'foi bim', 'foe bem', 'foa bom', ]; my $inst2 = '3 A -2 D'; # intended result my @result2 = ( 'foo -2 bam', 'foi -2 bim', 'foe -2 bem', 'foa -2 bom', );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Howto insert numbers into between strings alternately
by GrandFather (Saint) on Oct 22, 2005 at 08:26 UTC | |
|
Re: Howto insert numbers into between strings alternately
by pg (Canon) on Oct 22, 2005 at 15:18 UTC |