in reply to search and print in perl
Some sample data, outlining both matching and non-matching cases, would help - IMO, your description doesn't quite cut it for me - I'm barely a proficient programmer, I'm most certainly not a geneticist e.g. in this case, is a gene represented by a single char, a sequence of chars, or both?
That being said...
1. This:
is more usually (and in most cases, better) written as.... . $text = ""; while($line = <IN>) { $text .= $line; } . .
2. AFAICT i.e. subject to further details being provided, your RE appears to only capture start & end delimiters.local $/; # Ensure line-ends are ignored $text = <IN>; . .
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: search and print in perl
by hellworld (Novice) on Jun 01, 2009 at 12:06 UTC | |
by Bloodnok (Vicar) on Jun 01, 2009 at 12:42 UTC |