Help for this page

Select Code to Download


  1. or download this
    sub set_column_widths {
        my $h         = shift; # reference to hash table of speeds, keyed 
    +by datetime, then by database
    ...
            $databases->{$db} = $databases->{$db} > $l ? $databases->{$db}
    + : $l;  
        }
    }
    
  2. or download this
    set_column_widths(\%h, \%db, \@db);
    
  3. or download this
    printf "%11s", $_ for (@db);
    
    ...
    # stick a space between columns
    
    printf " %$db{$_}s", $_ for (@db);
    
  4. or download this
    #!/usr/bin/env perl
    use 5.010; use strict; use warnings;
    ...
    server02: 2015-06-01T12:41:03-04:00  MYDB101                 7 MB/sec
    server02: 2015-06-01T12:41:03-04:00  MYDB202                 7 MB/sec
    server02: 2015-06-01T12:41:03-04:00  _OTHER_DB_             55 MB/sec