maha has asked for the wisdom of the Perl Monks concerning the following question:
i had a problem in string concatenation, i want to concatenate all the authors name into single string
(e.x):
<P_contrib-author>Mariel Miller</P_contrib-author>,<P_contrib-author>Allyson Fiona Hadwin</P_contrib-author>,<P_contrib-author>Jenna Cambria</P_contrib-author>output:
<alt-title alt-title-type="running-head-verso">Mariel Miller, Allyson Fiona Hadwin, Klauda, and Jenna Cambria</alt-title>I try to below coding but it does't work properly
Give some suggestions. Thank in advancewhile($line =~ /<P_contrib-author>(.*?)<\/P_contrib-author>/) { $auth .=$1; } $line ="<alt-title alt-title-type=\"running-head-verso\">$auth</alt- +title>";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: string concatenation
by moritz (Cardinal) on Dec 28, 2011 at 07:49 UTC | |
by maha (Novice) on Dec 28, 2011 at 08:19 UTC | |
by AnomalousMonk (Archbishop) on Dec 28, 2011 at 09:00 UTC | |
by moritz (Cardinal) on Dec 28, 2011 at 09:01 UTC | |
|
Re: string concatenation
by AnomalousMonk (Archbishop) on Dec 28, 2011 at 08:54 UTC | |
|
Re: string concatenation
by thomas895 (Deacon) on Dec 28, 2011 at 07:53 UTC | |
by maha (Novice) on Dec 28, 2011 at 08:23 UTC | |
|
Re: string concatenation
by Marshall (Canon) on Dec 30, 2011 at 00:55 UTC |