sgw sketch sgwpts1 format EMS,SGW1,%date%,%time%,%sgw-vpnname%,%sgw-vpnid%,%sgw-servname%,%sgw-servid% sgw sketch sgwptsh format EMS,SGWh,%date%,%time%,%sgw-vpnname%,%sgw-vpnid%,%sgw-servname%,%sgw-servid% sgw sketch sgwptsi format EMS,SGWi,%date%,%time%,%sgw-vpnname%,%sgw-vpnid%,%sgw-servname%,%sgw-servid% sgw sketch, sgwptsH format, EMS,SGWH,%date%,%time%,%sgw-vpnname%,%sgw-vpnid%,%sgw-servname%,%sgw-servid% sgw sketch sgwptsI format EMS,SGWI,%date%,%time%,%sgw-vpnname%,%sgw-vpnid%,%sgw-servname%,%sgw-servid% #### sub load_sketch { my ($sketch_file) = @_; my %all_sketches = (); open(DAT, $sketch_file) || die("Could not open file $sketch_file!"); my @lines = ; close(DAT); foreach (@lines) { s/[\r\n\s%]+//g; my @all_columns = split(',', $_); $all_sketches{ uc($all_columns[1]).'STAT' } = [ @all_columns ]; # Output file will have SGWSTAT in its name } return %all_sketches; } 1; # tells perl that the package is ready to run