in reply to Re: Compilation error in the perl script
in thread Compilation error in the perl script

What is the best way to indent the code, I always create the code in a notepad or a wordpad file which never lets me indent the code. Is there a utility to indent it?
  • Comment on Re^2: Compilation error in the perl script

Replies are listed 'Best First'.
Re^3: Compilation error in the perl script
by choroba (Cardinal) on Aug 03, 2015 at 22:27 UTC
    You can try perltidy, but if you really want to program, you should learn to use a real editor, which can help you with indentation, commenting, completion, etc.
    لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
Re^3: Compilation error in the perl script
by stevieb (Canon) on Aug 03, 2015 at 22:28 UTC

    I normally recommend vim, but it has quite a large learning curve. I think Notepad++ has decent syntax highlighting and code continuation, but I don't remember for certain (I use Unix).

    Notepad can indent, but not automatically. Typical indenting is one tab per block. However, the standard indenting if possible in your editor is set your tab to four spaces. Here's an article on how to set Notepad++ to 4-space tabs.

      Yes notepad++ is pretty good, I use it for the few scripts I write and it works a treat. Although, I suggest to go to Settings->Preferences and turn off autocompletion.
Re^3: Compilation error in the perl script
by runrig (Abbot) on Aug 03, 2015 at 22:28 UTC
    There's perltidy. But you'll probably have to fix the syntax error in your code before it'll work.
Re^3: Compilation error in the perl script
by Marshall (Canon) on Aug 05, 2015 at 07:37 UTC
    Textpad allows indentation and language specific formatting. This program costs a few bucks, but it works.