Skip to content

Instantly share code, notes, and snippets.

@bigpresh
Created December 20, 2012 15:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bigpresh/4346087 to your computer and use it in GitHub Desktop.
Save bigpresh/4346087 to your computer and use it in GitHub Desktop.
Example for lroe
#!/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
[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