Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding/Replacing Data 1

Status
Not open for further replies.

biobrain

MIS
Jun 21, 2007
90
GB
I have a file


COMPND MOL_ID: 1;
COMPND 2 MOLECULE: CELL DIVISION PROTEIN KINASE 2;

Now I want to write a script which matches COMPND 2 and than add another variable before MOLECULE

i.e COMPND 2 $variable MOLECULE: CELL DIVISION PROTEIN KINASE 2;

I have written this

if ($_=~/^COMPND\s+\/2/) {
#print $_;
my $test2=$_;

But How to proceed next?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top