Readmode(4); my $input = lc(ReadKey(0)); if ($input =~ m/left arrow key here/) { goto LEFT; } elsif ($input =~ m/right arrow key here/) { goto RIGHT; }