79754210

Date: 2025-09-03 06:38:05
Score: 1
Natty:
Report link

Your definition for @allColors should use " instead of ' in order for the escape sequences to be interpreted with meaning.

i.e.

my @allColors = "\e[48;5;1m  \e[48;5;2m  \e[48;5;3m  \e[48;5;4m  \e[48;5;5m".words;

The escape characters are encoded in a string when the string is first evaluated.

e.g.

my $notNewline = '\n';
my $newline = "\n";
print "Foo $newline Bar $notNewline"

will output Foo ␤ Bar \n even though the $notNewline is printed using "

Reasons:
  • Has code block (-0.5):
  • User mentioned (1): @allColors
  • Low reputation (0.5):
Posted by: lloyd