Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perl errors Use of uninitialized value #3

Closed
hymie0 opened this issue Feb 7, 2022 · 2 comments
Closed

perl errors Use of uninitialized value #3

hymie0 opened this issue Feb 7, 2022 · 2 comments

Comments

@hymie0
Copy link

hymie0 commented Feb 7, 2022

Getting lots of errors that look like this:

Use of uninitialized value $keyboard[3] in substitution (s///) at wordle.pl line 113, line 1.
Use of uninitialized value $keyboard[3] in substitution (s///) at wordle.pl line 113, line 1.
Use of uninitialized value $keyboard[4] in substitution (s///) at wordle.pl line 113, line 1.

Need this patch around line 110-ish

    foreach my $gc(split (//,$guess)){
        my $c=($answer=~/$gc/)?color("cyan"):color("red");
        my $r=color("reset");
  •           foreach my $kbRow (0..@keyboard){
    
  •           foreach my $kbRow (0..$#keyboard){
                      $keyboard[$kbRow]=~s/ $gc / $c$gc$r /;
              }
      }
    
@saiftynet
Copy link
Owner

Hopefully fixed, thanks

@saiftynet
Copy link
Owner

Committed and credited

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants