February 2013 Archives

Test::Whitespaces

Perl is very flexible in may ways including whitespaces. Perl does not force you to use tab or spaces. The script works fine no matter if it has DOS or UNIX line breaks.

But there are some good practices. I preffer these rules:

  • every line ends with "\n" (including the last line)
  • UNIX way for new lines (only "\n", not "\r\n")
  • no tabs, but 4 spaces instead
  • no trailing spaces
  • no empty lines in the end of the file

I want to make sure that all that rules are followed in my source code. So I've written ="https://metacpa…

About Ivan Bessarabov

user-pic I blog about Perl.