in reply to need help to fix "use of uninitialized value..."
What I am trying to achieve is a set of Pairs which is then (in the script that this code fits in) fed into another script which performs some functions on each pairs defined.
I tried:
my $Person1 = defined($1) ? $1 : ''; my $Person2 = defined($2) ? $2 : '';
And the end results were the same.
So then I tried re-writing the regex to this:
if ($Line =~ m/^Pairing Start\s+(\w+)\s+(\w+)/) {
And I go the same results:
Use of uninitialized value within %PairsOf in concatenation (.) or str +ing at ./test_removing_pair_unitialized_value_error.pl line 26, <DATA +> line 14. Use of uninitialized value within %PairsOf in concatenation (.) or str +ing at ./test_removing_pair_unitialized_value_error.pl line 27, <DATA +> line 14. Use of uninitialized value within %PairsOf in concatenation (.) or str +ing at ./test_removing_pair_unitialized_value_error.pl line 27, <DATA +> line 14. Use of uninitialized value within %PairsOf in concatenation (.) or str +ing at ./test_removing_pair_unitialized_value_error.pl line 27, <DATA +> line 14. Use of uninitialized value within %PairsOf in concatenation (.) or str +ing at ./test_removing_pair_unitialized_value_error.pl line 27, <DATA +> line 14.
I also checked the __DATA__ to ensure there were no white spaces at the end of each and every line and I wasn't able to find any..
Any other Idea's?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: need help to fix "use of uninitialized value..."
by Anonymous Monk on Feb 17, 2012 at 00:32 UTC | |
by mlebel (Hermit) on Feb 18, 2012 at 01:52 UTC | |
|
Re^2: need help to fix "use of uninitialized value..."
by Marshall (Canon) on Feb 17, 2012 at 05:36 UTC | |
by mlebel (Hermit) on Feb 18, 2012 at 02:15 UTC |