I'm having problem with the regex in the following bit of code:
#capitalize the first character of the first name
$varFirstName = ("First_Name" . $nameSub);
$in{$varFirstName} =~ s/\b(\w)/\U$1/g;
It is giving me this error:
[Fri Jun 15 07:04:08 2001] C:\prod\nameUpdate.pl: Use of uninitialized value at C:/perl/lib/name.pm line 463.
Through use of prints, I've gotten the error narrowed down to the $1 variable. I've done this by doing a 'print' on that variable prior to the problem line of code, which then gives me 2 errors like the one listed directly above this paragraph. If I do a print on the $in{$varFirstName} prior to the problem line of code, I don't get the extra error, but do get the value in that variable. And that particular variable is initialized directly above the problem line of code, as you can see.
Since the $1 variable isn't a variable I can alter or initialize (I tried that), is there some way I can get rid of the error message I'm receiving? It is filling up my log files.
Any help would be appreciated, as we are using this capitalization regex in several places, and it is affecting several log files.
Thanks!
Kathy
#capitalize the first character of the first name
$varFirstName = ("First_Name" . $nameSub);
$in{$varFirstName} =~ s/\b(\w)/\U$1/g;
It is giving me this error:
[Fri Jun 15 07:04:08 2001] C:\prod\nameUpdate.pl: Use of uninitialized value at C:/perl/lib/name.pm line 463.
Through use of prints, I've gotten the error narrowed down to the $1 variable. I've done this by doing a 'print' on that variable prior to the problem line of code, which then gives me 2 errors like the one listed directly above this paragraph. If I do a print on the $in{$varFirstName} prior to the problem line of code, I don't get the extra error, but do get the value in that variable. And that particular variable is initialized directly above the problem line of code, as you can see.
Since the $1 variable isn't a variable I can alter or initialize (I tried that), is there some way I can get rid of the error message I'm receiving? It is filling up my log files.
Any help would be appreciated, as we are using this capitalization regex in several places, and it is affecting several log files.
Thanks!
Kathy