in reply to local variable syntax
A full answer would take a book, but I'll do my best.
'What is the syntax for assigning values to local variables?' If you don't know the difference between 'local' and 'my', then use 'my'. 'local' variables are specialised and not often needed.
'my' variables can be visibile to other subroutines in the same script file - it is a question of where you declare them.
It is generally considered to be 'bad form' to globally share variables like this.
'Is there a standard for how many spaces to leave between the variable name and the assignment operator?' Answer: no, just be consistent.
How does one know whether to enclose a value in single-quotes, double-quotes, parentheses, or nothing?' Single-quotes surround unalterable text - we don't want perl to mess with the text within single quotes. Using double quotes invites perl to 'interpolate' special characters. Usually use double quotes around scalars ($var) and arrays (@fred) and characters like \n, \t.
Parentheses are used for several things in Perl, but around variables it indicates a list. Nothing around a variable is usually fine, but around text is a bareword, which is usually wrong.
If you have written a program then you are a programmer - there is no going back. Ask, crib other people's code, practice. Never stop learning.