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…
As we all know $#boo returns the last index of array @boo.
It is clear why we have the prefixes '$' and '@' ('$' is like the first
letter of the word 'scalar' and the '@' is like the first letter of the word
But is it unclear why there is '#' after the dollar sign. I've checked out
the perl v 1.0 and in the man page there is such text:
> you may find the length of array @days by evaluating "$#days", as in csh.
> [Actually, it's not the length of the array, it's the subscript of the last
> element, since there is (ordinarily) a 0…