So my advice, if you want to solve your warning, start rewriting the program to work without goto
See Text Based Perl Game and especially the responses (and links in responses) for specifics
So in the end you write something like, something short, where the control-flow is easy to seee (birds eye view), no gotos :) no spaghetti
sub LHCC { DECISION: while( 1 ) { WelcomeMsg(); my $decision = GetDecision(); if( $decision =~ /quit/ ) { last DECISION; } elsif( $decision =~ /ready/ ) { GoDoReadyDecision(); } else { TryAgainMessage(); } } } ## end sub LHCC sub GoDoReadyDecision { my $no_statements = GetNoStatements(); ...; GetQPStatements( \%Statements ); ...; my( $conclusions, $o_conclusions ) = ConcludeConclusions( \%Statements, \%Contrapositives ... ); return $conclusions, $o_conclusions; } ## end sub GoDoReadyDecision sub ConcludeConclusions { my( $Statements, $Contrapositives ) = @_; while( my( $key, $value ) = each %$Statements ) { ...; } for my $key ( keys %$Contrapositives ) { my $value = $Contrapositives->{$key}; ...; } ...; return \@Conclusion, \@OtherConclusion; } ## end sub ConcludeConclusions
And when you get "use of unitialized ..." you can focus only on one small subroutine, you Data::Dump::dd( \@_ ) and can debug only this one small part
Good luck
In reply to Re: Hash Uninitialized Values Error
by Anonymous Monk
in thread Hash Uninitialized Values Error
by slinky773
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |