VSCode has a beautifier way for every kind of file.
A VSCode extension must get installed to use it. I installed the extension: Simple Perl. After that I highlighted some perl code in some perl file. Right-click - Menue: Format selection. The code gets formatted.