in reply to Problem printing in colors

because perl knows nothing about ANSI escape sequences, it just see them as normal characters and count them inside %-25s formats.

Insert them with additional formaters, i.e:

printf "\n\t%s%-25s%s| %s%-25s%s\n", RED, 'Filename', RESET, UNDERLINE +, 'Comment', RESET;