Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Parsing Guassian '03 Log Files

by BrowserUk (Pope)
on Jan 31, 2008 at 03:42 UTC ( #665274=note: print w/replies, xml ) Need Help??


in reply to Parsing Guassian '03 Log Files

Use as perl -n0 thisScript theDataFile >outputFile

#! perl use strict; s[ Optimized \s Parameters (?: .+? \n ){5} (.+?) -+ \n GradGrad ]{ print "$_\n" for map{ (split)[ 2 ] } split "\n", $1; }gsex or warn 'No match';;

Against your sample (with some junk before and after) produces:

C:\test>perl -n0 junk9.pl junk2.dat 1.1136 1.3392 117.4979 0.9929

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Replies are listed 'Best First'.
Re^2: Parsing Guassian '03 Log Files
by Andrew_Levenson (Hermit) on Jan 31, 2008 at 06:18 UTC
    That's fantastic, thank you. I'll test and tinker with it when I get to the lab tomorrow, see if I can't devise some solution of my own given your guidance.
    C(qw/74 97 104 112/);sub C{while(@_){$c**=$C;print (map{chr($C!=$c?shift:pop)}$_),$C+=@_%2!=1?1:0}}

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://665274]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2018-06-21 14:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?



    Results (118 votes). Check out past polls.

    Notices?