Hi all,

Sorry to come with what will undoubtedly be a trivial problem.  Maybe I
can't see the wood for the trees here, but I'm stumped.

I have a script (attached) which goes away to a website, follows a
couple of links and grabs a page.  All very simple and works just fine,
until I try to parse the page (held in $mrnainfo).

The page I'm attempting to parse will be an output something like:

***
AK027199



Alignment of AK027199 and chr16:22557964-22560092
Click on links in the frame to left to navigate through alignment|
Matching bases in cDNA and genomic sequences are colored blue| Light
blue bases 
indicate gaps in the alignment| 
cDNA AK027199
cttaatgagt gagcagtaag tctgtgtaag aggctgaatg catgcccctc  50
agataagcca gtacactcct tgcttagcaa cagaacatca gggtgatgtg  100
[lots more like this]
tttatttgga aggttacctg ctgttggatt taataaattt gtttacttga  2100
aaaaaaaaaa aaaaaaaa
Genomic chr16 <reverse strand>:
ttctgcaaag ggatccaagg tgaggtgtgt gtagggtttg aagttatact  22560143
[until the end!]***
I'm just trying to pull the data from "cDNA AK027199" to the word
"Genomic", at the moment I'd be happy just to grab it in a chunk and
tidy up later rather than an exact regexp. I use visual_regexp.2.2 to
check I am matching the right things (I seem to be with the regexp used
in the script), but the script is churning out this error:

Use of uninitialized value in print at ./perlist.pl line 117, <STDIN>
line 1.

This seems to happen when I try :

(my $cdna) = $mrnainfo=~ /cDNA\s+A(.*)\s+G/;
print $cdna;

I also tried just a straight: 

$mrnainfo=~ /cDNA\s+A(.*)\s+G/;
print $mrnainfo;

to pull out the matching chunk without assigning to a different
variable
and it returns $mrnainfo untouched... but no claims of uninitialised
values

My regexp technique is appalling and I'm still very much a perl newbie.
I'd appreciate any comments on this problem, and indeed any comments on
the script, I'm sure I could learn a lot from general tips as well.

Thanks very much for your time,

Dan

____________________________________________________________
Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie

perlist.pl

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to