There are several basic rules used in Perl that are necessary for writing problems in .pg. The following list is probably most of what you will need. Each statement in Perl must end on a semicolon. Statements can be spread over several lines. Spacing and indentation is for the most part ignored by perl and should be used to make the program more readable.
Lists contain a sequence of scalar variables indexed by integers starting with zero.
They have an implied order. Hash arrays also contain a set of scalar variables, but the indices can be any token, and they have no implied order. The hash array is stored as key, value pairs 4. Quotes Understanding how to create strings using quotes is important for writing WeBWorK PG problems. The two important concepts are interpolation of variables and temporarily redefining quote tokens.