trudy123g has asked for the wisdom of the Perl Monks concerning the following question:
I would really like to be able to pick out the letters from column 1 that correspond to specific combinations from the string in column 2. e.g. for ".LLL"THAETURQU .LLL..RRR JURYATAUTIOPW .LLL...LL.RRR TURIWOWQNQQUTYRIOPWMNHF L..L..LLLL.LL.R..L.LLLL
Is there an easy way to provide a list of combinations, such as a file:THAETURQU .LLL..RRR THAE JURYATAUTIOPW .LLL...LL.RRR JURY TURIWOWQNQQUTYRIOPWMF L..L..LLL.LL.R..L.LLL OWQN,PWMF
that would output the corresponding letters in from column 1 in subsequent columns headed, ".LLL", "LLLL", ".RRR", "RRRR"?.LLL LLLL .RRR RRRR
I suspect this is really simple, but it would be really helpful, thanks!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Extracting string based on comparison to second string?
by kennethk (Abbot) on May 19, 2010 at 21:36 UTC | |
|
Re: Extracting string based on comparison to second string?
by ikegami (Patriarch) on May 19, 2010 at 22:38 UTC | |
|
Re: Extracting string based on comparison to second string?
by johngg (Canon) on May 19, 2010 at 23:01 UTC | |
by trudy123g (Initiate) on May 20, 2010 at 22:16 UTC |