Your use of '^' is causing problems. '^' marks the beginning of an line and '$' marks the end of a line ("the buck stops here").
If the PMID is always numeric simply use:
if($foo->identifiers() =~ /PMID: (\d+)/) {print FH "$1\n";}
Update: reworded post.
In reply to Re: Extracting web data
by zek152
in thread Extracting web data
by smandape1
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |