rickkar has asked for the wisdom of the Perl Monks concerning the following question:
i really just need some basic s/w engring architecting guidance... when i say 'architecting' -- i mean pseudo-code/stmts i can go after in the Perl book i have... and hopefully online examples...
i'm using Perl and i'm trying to parse Medline/Pubmed file paths on a Unix system in order to finally pass the PMID from each path to a pmid2doi conversion website < http://www.pmid2doi.org/ > ...
the structure of each link is of the form... /xxxxx/xxxxx/xxxxx/xxxxx/xxxxx/UNC00000000000042/00223468/v45i3/S0022346809003820
--ls
18507872 main.pdf main.raw main.xml
where: 00223468 <-- this is the PMID
so far, in Perl, i've got something that looks like this...
#!/bin/perl use strict; use warnings; use LWP::Simple; # this is bash-like implementation of what i'm trying to do for doi in `find . -name "*.xml" | awk -F\/ '{print $2}' ` #this extr +acts the PMID do echo $doi wget http://www.pmid2doi.org/ done
the website < http://www.pmid2doi.org/ > requires inputting the PMID in order to get back the DOI...
this is what i need to get running in Perl... and i need a little help in architecting & implementing this...
given your development background, i'm grateful for any insights... or recommended sites for generating regular expressions in Perl...
thanks very much!
Additionally,
I see that http://www.pmid2doi.org/ says the REST API expects the http://www.pmid2doi.org/ PLUS the DOI value.
So I need to find some example Perl code that gets a REST value from a URL.
In REST I just prepare the URL as specified and then the returned result should be the value I want.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: ... architecting & implementing help w/ Perl...
by aitap (Curate) on Oct 25, 2012 at 17:16 UTC | |
by rickkar (Initiate) on Oct 25, 2012 at 18:04 UTC | |
by aitap (Curate) on Oct 25, 2012 at 18:16 UTC | |
by rickkar (Initiate) on Oct 26, 2012 at 17:04 UTC | |
Re: ... architecting & implementing help w/ Perl...
by Anonymous Monk on Oct 26, 2012 at 12:52 UTC |