Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^4: reading and working with grow.out files

by rmgzsm9 (Novice)
on Apr 29, 2012 at 13:12 UTC ( #967932=note: print w/ replies, xml ) Need Help??


in reply to Re^3: reading and working with grow.out files
in thread reading and working with grow.out files

Can I ask you for little more help? The program helped me so much. Thanks for that. Now I need to modify it a bit more. I tried myself but got stuck at one point. Can u help me out?

 
so now I don't want to print the line containing ligand name , rather now i want to count no of lines and want to count amongst those lines, the lines containing H as a 1st character of each row. I successfully counted the lines by using following code

# changed the code from line 10 of above written code while (my $line= <FILE> { $ count=0; if $line=~/$ligand/; { $count++;} } Print"total no of interaction are $count"; }close (FILE); }

this counts only no of lines. Now, I want while the program is reading code line by line it should check the first character and if it is H the it should count that line and put the count in another variable say count2 or something.

 
 Please help 


Comment on Re^4: reading and working with grow.out files
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://967932]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2014-09-22 05:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (180 votes), past polls