Re: find a first column value ...
- From: "Dr.Ruud" <rvtol+news@xxxxxxxxxxxx>
- Date: Fri, 19 May 2006 22:36:38 +0200
BD schreef:
if I give any accession no like AW780891
than it should find the first column value like 203253.
If you only need to find one value per run:
#!/usr/bin/perl
use strict;
use warnings;
while ( <DATA> )
{
/ ^ (\d+) .* [ ]GB[|] ${ARGV[0]} [ ] /x
and print "$1\n" and exit(0)
}
exit(1)
__DATA__
203252 GB|AI461105 GB|AI900630 GB|AI900894 GB|AI901187
203253 GB|AI736220 GB|AW780891 GB|BE806781 GB|BG157087
203254 GB|AI440899 GB|AW185396 GB|AW185458 GB|AW152990
203255 GB|AI416923 GB|AI437726 GB|AI437966 GB|AI438062
203256 GB|AI441714 GB|AI930592 GB|AI855868 GB|AI856032
--
Affijn, Ruud
"Gewoon is een tijger."
.
- Follow-Ups:
- Re: find a first column value ...
- From: BD
- Re: find a first column value ...
- References:
- find a first column value ...
- From: BD
- find a first column value ...
- Prev by Date: My Bundle::Modules not installing with the CPANPLUS shell
- Next by Date: Re: Error in DBD::Chart (called from DBIx::Chart)
- Previous by thread: Re: find a first column value ...
- Next by thread: Re: find a first column value ...
- Index(es):
Relevant Pages
|