sub updtDescrip() { my $tmpPthFil = "$demoQcPth"."tmp_drs_demoqc$mm$yy$c\.ini"; # Get a temp. ini object $tmpIni = new Config::IniFiles( -file => $tmpPthFil, -allowedcommentchars => '*', -nocase => '1'); if (!defined($tmpIni)) { &errMsg2 ("Failure re-accessing \"tmp_\" DRS file. Program will abend."); &errMsg1 (" File: $tmpPthFil"); &abend (); }; my $tmpVal = $tmpIni->val( "Application", "Description"); # Section, Key if (!defined($tmpIni)) { &errMsg2 ("The \"Description\" value cannot be found. Program will abend."); &errMsg1 (" File: $tmpPthFil"); &abend(); }; # insert, e.g., "1104 / " before the description $tmpVal =~ s/(\w+)/DemoQC $mm$yy \/ $1/; # $tmpVal = $tmpIni->setval( "Application", "Description", $tmpVal); # Section, Key if (!defined($tmpIni)) { &errMsg2 ("Resetting the \"Description\" value failed. Program error. Program will abend."); &errMsg1 (" File: $tmpPthFil"); &abend(); }; # Rewrite the ini file $tmpIni->RewriteConfig($tmpPthFil); if (!defined($tmpIni)) { &errMsg2 ("Failure re-accessing \"tmp_\" DRS file. Program will abend."); &errMsg1 (" File: $tmpPthFil"); &abend (); }; printf(" DemoQc descrip: $tmpVal \n tmpPthFile: $tmpPthFil\n"); # unlink("$tmpPthFil") or die ("Failure deleting: $!"); # rename("$tmpPthFil\-new", "$tmpPthFil") or die ("Failure renaming: $!"); };