swilhelm73 has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl -w #use strict; my $line1=$_; $LOGFILE="Output.txt"; open(LOGFILE) or die("Could not open Output.txt."); foreach $line1(<LOGFILE>) { if ($line1 =~ m/^Start/) { $time = $line1; } elsif ($line1 =~ m/^Response\s+Time\s+\(avg\):\s+([0-9.]+)/) { $response = $line1; } {print join $time, $response} }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Simple Parsing Script
by roboticus (Chancellor) on Apr 23, 2012 at 19:24 UTC | |
|
Re: Simple Parsing Script
by toolic (Bishop) on Apr 23, 2012 at 19:22 UTC | |
|
Re: Simple Parsing Script
by 2teez (Vicar) on Apr 23, 2012 at 20:04 UTC | |
by swilhelm73 (Initiate) on Apr 23, 2012 at 20:16 UTC |