One thing I saw... You can replace all that if...elsif...elsif...elsif... stuff with an imitation switch. Like this:
for ($Examine[0]) {
/Uptime:\s+(\w.*)/i && do { $ws->Cells($row, "E")->{'Value'} = "$1"; last; };
/Kernel version:\s+(\w.*)/i && do { $ws->Cells($row, "F")->{'Value'} = "$1"; last; };
/Product type:\s+(\w.*)/i && do { $ws->Cells($row, "G")->{'Value'} = "$1"; last; };
# usw.
}
Lots cleaner, and, if I'm not mistaken, faster. I built a whole translation sub using nothing more than this trick. One hint for speed--if there are possibilities that get "hit" more frequently than others, although that doesn't seem the case here, put them at the top.
Deane
_______________________________________________ ActivePerl mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
