For Programmers: Free Programming Magazines  


Home > Archive > PERL Beginners > April 2005 > Lines Interchange









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Lines Interchange
N. Ganesh Babu

2005-04-24, 3:55 pm

Input:

<mkt=gbr>
<fil>11543
<pre=0-86315,0-903540>
<pbs>Floris Bks GBR
<imp=I1>
<dst>BkSource GBR
<pre=0-940262,0-9701097,1-58420>
<pbs>SteinerBooks Inc USA
<i=I2>Lindisfarne USA
<dst>BkSource GBR
<cat>Floris Books New Books January-June 2005

Output:

<src>Floris Bks
<mkt=gbr>
<fil>11543cat
<pub>Floris Bks
<cat>Floris Books New Books January-June 2005
<pbs>Floris Bks GBR
<imp=I1>
<pre=0-86315,0-903540>
<dst>BkSource GBR
<pbs>SteinerBooks Inc USA
<imp=I2>Lindisfarne USA
<pre=0-940262,0-9701097,1-58420>
<dst>BkSource GBR

How the above input should be fomated as output. Please help me.

Regards,
Ganesh

Charles K. Clarkson

2005-04-24, 3:55 pm

N. Ganesh Babu <mailto:ganesh@ald.apexcovantage.com> wrote:

[snip]
: How the above input should be fomated as output. Please help me.

What are the rules?


Charles K. Clarkson
--
Mobile Homes Specialist
254 968-8328

N. Ganesh Babu

2005-04-25, 8:56 am

Dear Charles,

The rules are as follows:

1. The first tag should be <src (single tag)
2 . The second tag should be <mkt (single tag)
3. The third tag should <fil (may be multiple fil tags)
4. The fourth tag should be <pub (single tag)
5. The fifth tag should be <cat (single tag)
6. Next, the set of 4 tags (<pbs>, <imp>, <pre> and <dst> ) may come
multiple times. <dst> may come multipe times with in the set.

Example:

<src>
<mkt>
<fil>
<fil>
<pub>
<cat>
<pbs>
<imp>
<pre>
<dst>
<pbs>
<imp>
<pre>
<dst>
<dst>

Regards,
Ganesh

Charles K. Clarkson wrote:

>N. Ganesh Babu <mailto:ganesh@ald.apexcovantage.com> wrote:
>
>[snip]
>: How the above input should be fomated as output. Please help me.
>
> What are the rules?
>
>
>Charles K. Clarkson
>
>

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com