Perl Verify PMCoreBasedAD

#!/usr/bin/perl -w use strict; use English; use Carp;                 use Getopt::Long;        use ReadConfFile; use PerformDBOperations; my ($confFile,$boolHelp) = (); my $boolError = GetOptions("c=s" => \$confFile,                           "h|help!" => \$boolHelp); if ($boolHelp || $confFile eq "") {   Help();   exit(0); } eval  {   # my $readConf = new ReadConfFile();   my $readConf = ReadConfFile->new();   my %confValues = $readConf->ReadConfFile($confFile);   undef $readConf;   while(my ($key,$value) = each %confValues)   {     print "$key => $value\n";   } }; if ($EVAL_ERROR) {   print "Fail to read $confFile!\n"; } eval {   my $dbUser = "pmr";   chomp(my $pmrPwd = `polpasmx -$dbUser`);   my $pmrDbPtr = new PerformDBOperations();   $pmrDbPtr->ConnectTo($dbUser,$pmrPwd);   my $sql = "select co_gid,co_int_id,co_name,co_dn from utp_common_objects where co_dn like '%BRS%'";   my $sth = $pmrDbPtr->DoSQLStatement($sql);   print "\n-------------------------------------------------------------------------";   print "\n|CO_GID\t\t\t|CO_INT_ID\t|CO_NAME\t|CO_DN\t\t|";   print "\n-------------------------------------------------------------------------\n";   while(my @arrRow = $sth->fetchrow())   {     foreach(0..$#arrRow)     {        print "|".$arrRow[$_]."\t";     }     print "|\n-------------------------------------------------------------------------\n";   } }; sub Help         {          print " Usage: perl VerifyPMCoreBasedAD.pl -c <ConfigFileName with full path> -m <test mode> -label <label to be used in result file names>\n";   print "\n Example: perl VerifyPMCoreBasedAD.pl -c /home/omc/test.cf -m 1 -label testrun \n"; }

相关文章

1. 如何去重 #!/usr/bin/perl use strict; my %hash; while(...
最近写了一个perl脚本,实现的功能是将表格中其中两列的数据...
表的数据字典格式如下:如果手动写MySQL建表语句,确认麻烦,...
巡检类工作经常会出具日报,最近在原有日报的基础上又新增了...
在实际生产环境中,常常需要从后台日志中截取报文,报文的形...
最近写的一个perl程序,通过关键词匹配统计其出现的频率,让...