The content looks great. I have a few grammatical suggestions, but nothing serious...feel free to ignore.
> =pod > > =head1 Strings > > A literal string is formed when text is enclosed by a quoting > operator; there are two types: interpolating and non-interpolating. Kinda confusing. How about: quoting operator. There are two types of quoting operators: interpolating and non-interpolating. > Interpolating constructs insert (interpolate) the value of an > expression into the string in place of themselves. Themselves refer to the constructs. How about: Interpolating constructs insert, or interpolate, the value of an expression into the string in place of the evaluated expression. > The most basic expression that may be interpolated is a scalar > variable. In non-interpolating constructs, a variable name that > appears within the string is used as-is. For example: > > 'The quick brown $animal' > "The quick brown $animal" > > In the first string, perl will take each character in the first string > literally and perform no special processing. take is confusing...implies removal to me. How about In the first string, perl treats each character literally resulting in no special processing. > However, the value of the > variable $animal is inserted into the second string string in place of > the text $animal. If $animal had had the value "fox", then the second > string would have become "The quick brown fox". Use has instead of had had. Also: second string would be > More on the various quoting operators below. > > =head2 Non-Interpolating Constructs > > Non-Interpolating constructs are strings in which expressions do not > interpolate or expand. Non-interpolating constructs are strings that do not interpolate or expand expressions. > The exception to this rule is that the > backslash character, \, will escape the character that immediately > follows it. What about \ qq...is that an exception as well or just a different rule? > The base form for a non-interpolating string is the single-quoted > string: 'string'. However, non-interpolating strings can also be formed Additionally instead of However > with the q[] operator. The q[] operator allows strings to be made with > any non-space, non-letter, non-digit character as the delimeter instead > of '. The q[] operator allows strings to be delimited by any non-space, non-letter, non-digit character instead of the single quote character ('). > In addition, if the starting delimeter is a part of a paired > set, such as [, <, or {, then the closing delimeter may be the > matching member of the set. In addition, the reverse holds true; s/In addition/Furthermore/ > delimeters which are the tail end of a pair may use the starting item > as the closing delimeter. > There are a few special cases for delimeters; specifically :, ( and #. > : is not allowed because it might be used by custom-defined quoting > operators to apply a attribute. : is not allowed because it is used to apply attributes to custom-defined quoting operators. ( is not allowed because it is used to > pass arguments to attributes. Finally, # is allowed, but there cannot > be a space between the operator and the #. > =head3 Embedding Interpolated Strings I don't think this belongs here. You haven't talked about interpolated strings, yet you are going to talk about embedding them. I would move this to after the interpolated string section. > It is also possible to embed an interpolating string within a non- > interpolating string by the use of the \qq[] construct. s/the use of/using/ > A string > inside a \qq[] constructs acts exactly as if it were an interpolated s/constructs/construct/ > string. Note that any end-brackets, "]", must be escaped within the > the \qq[] construct so that the parser can read it correctly. Note that an end-bracket, ], must be escaped within the \qq[] construct. This allows the parser to correctly parse the construct. > A set of braces is a special op that evaluates into the list of words > contained, using whitespace as the delimeter. It is similar to qw[] s/whitespace/a space character/ ??? I'm not sure on this, but whitespace is pretty vague. > =head2 Interpolating Constructs > > Interpolating constructs are another form of string in which certain > expressions that are embedded into the string are expanded into their > value at runtime. Interpolating constructs expand certain embedded expressions into their runtime values. > Interpolated strings are formed using the double > quote: "string". In addition, qq[] is a synonym for "", similarly to > q[] being a synoynm for ''. The rules for interpolation are as > follows: The rules for interpolation follow. > =item Scalars: C<"$scalar">, C<"$(expression)"> > Non-Reference scalars will simply interpolate as their value. $[] s/simply// > forces its expression into scalar context, which is then handled as > either a scalar or a reference, depending on how expression evaluates. s/,which/that/ > =item Lists: C<"@list">, C<"@(expression)"> > Arrays and lists are interpolated by joining their list elements by the > list's separator attribute, which is by default a space. Arrays and lists are interpolated by appending the list separator attribute ( by default a space ) to each element in the list and concatenating all of the list elements together. > Therefore, the > following two expressions are equivalent: s/:/./ > =item Hashes: C<"%hash">, C<"%(expression)"> > Hashes interpolate by joining its pairs on its .separator attribute, > which by default is a newline. Pairs stringify by joining the key and > value with the hash's .pairsep attribute, which by default is a space. Hashes interpolate using a (conceptual) three-phase process. First, the key/value pairs of the hash are stringified. This is accomplished by concatenating the pair's key with the hash's .parisep attribute and then concatenating the resulting string with the pair's value. Second, the hash's .separator attribute (by default a newline) is appended to each stringified pair. Finally, all of the pairs are concatenated together to form the stringified hash. > Note that hashes are unordered, and so the output will be unordered. Since hashes are unordered, the stringified version of the hash will also be unordered. > =item Subroutines and Methods: C<"&sub($a1,$a2)">, C<"$obj.meth($a)"> > Subroutines and Methods will interpolate their return value into the > string, which will be handled in whichever type the return value is. Subroutines and methods will have their return value interpolated into the string. The actual stringified form of the return value will depend on the type of the return value. > Same for object methods. delete this sentence. > Note that parens B<are> required during > interpolation so that the parser can disambiguate between object > methods and object members. s/Note that p/P/ s/B<are> required/are B<required>/ > =item Modifiers: C<\Q[]>, C<\L[]>, C<\U[]> > > Modifiers apply a modification to text which they enclose; they can be > embedded within interpolated strings. s/apply a modification to/modify the/ s/which/that/ Actually, they only work within interpolated strings, but they can be embedded even in non-interpolated strings...they just do nothing. > Within an interpolated string, perl will always try to take the > longest possible expression to interpolate. In an interpolated string, perl will always try to interpolate the longest possible expression. > For instance this: s/ this:/:/ > =head3 Embedding non-interpolated constructs: C<\q[]> I would put the interpolated embedding section around here, too. Sorry for being picky, Tanton