Created
December 20, 2012 15:48
-
-
Save bigpresh/4346087 to your computer and use it in GitHub Desktop.
Example for lroe
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use Data::Dump; | |
my %values; | |
for (<DATA>) { | |
/^ | |
\s* | |
(.+?) | |
\s{3,} | |
([\d.]+) | |
\s+ | |
([\d.]+) | |
/x and $values{$1} = [$2,$3]; | |
} | |
print Data::Dump::dump(\%values) . "\n"; | |
__DATA__ | |
Total Incoming Connect Time (minutes) 22 43 | |
Port Group 1 (minutes) 5 8 | |
Port Group 2 (minutes) 11 20 | |
Port Group 3 (minutes) 4 10 | |
Port Group 4 (minutes) 2 5 | |
Total Incoming Connections 55 119 | |
Avg Incoming Connect Time (minutes) 0.4 0.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[davidp@supernova:/dev/shm]$ perl lroe.pl | |
{ | |
"Port Group 1 (minutes)" => [5, 8], | |
"Port Group 2 (minutes)" => [11, 20], | |
"Port Group 3 (minutes)" => [4, 10], | |
"Port Group 4 (minutes)" => [2, 5], | |
"Total Incoming Connect Time (minutes)" => [22, 43], | |
"Total Incoming Connections" => [55, 119], | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment