diff --git a/wordle-life.cgi b/wordle-life.cgi index 8fa0b82..7698502 100755 --- a/wordle-life.cgi +++ b/wordle-life.cgi @@ -51,8 +51,9 @@ use Readonly; #textarea name, pull the value from POST and reload into textarea $wordle = $cgi->body_param('wordle-result'); + #if input textarea not changed from default text, do nothing - unless ($wordle =~ /\Q$defaulttext\E/) { + unless ($wordle =~ /\Q$defaulttext\E/ or $wordle eq '') { #[Cc] /){ #cheat, if they put in something that looks like an RLE, pass output through if ($wordle =~ /^#[Cc] /){ $rle = $wordle; @@ -67,7 +68,7 @@ use Readonly; exit; } - die "Invalid wordle parameter" unless length $wordle; + #die "Invalid wordle parameter" unless length $wordle; #Load template from DATA section and output my $mt = Mojo::Template->new(auto_escape => 1, vars => 1); @@ -83,7 +84,7 @@ use Readonly; sub generate_rle { my $headline = ""; - my $rleline; + my $rleline = ""; my $rowcount; my $myline; @@ -179,12 +180,11 @@ __DATA__

Paste your wordle share below and submit to convert it to a Conway's Life file so you can run it (to learn more about Conway's Life, read this).

-
+ - +


@@ -202,8 +202,7 @@ __DATA__ +<%= $rle %>

If the RLE is correct, it should be loaded in the Life Viewer, and so you are ready to go!