anaconda_wly has asked for the wisdom of the Perl Monks concerning the following question:
I don't know why below error message(I add it in the comment)
{ package packageA my %hash_map = ( "name" => "path", ......, ); sub new{ ........ } sub get{ my $class = shift; my $componentName = @_; my $path = $component_path{$componentName}; #error: #Use of uninitialized value $path in pattern match (m//) at below... if($path =~ m/HKEY_LOCAL_MACHINE/){ dosomthing; } } }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Use of uninitialized value in pattern match (m//)
by choroba (Cardinal) on Oct 31, 2012 at 17:12 UTC | |
by anaconda_wly (Scribe) on Oct 31, 2012 at 17:31 UTC | |
Re: Use of uninitialized value in pattern match (m//)
by Corion (Patriarch) on Oct 31, 2012 at 17:10 UTC | |
Re: Use of uninitialized value in pattern match (m//)
by space_monk (Chaplain) on Oct 31, 2012 at 17:22 UTC |
Back to
Seekers of Perl Wisdom