What a great question! There's some Perl short circuiting demonstrated here. For example:

Code

$f == 1 && $f = 0;

is functionally equivalent to:

Code

$f = 0 if $f == 1;

Why? Perl evaluates the first conjunct $f == 1 and, if true, proceeds to evaluate the second so the overall && statement can be evaluated. However, if the first conjunct is false, there's no need to evaluate the second, since the overall && statement is (already) false. This is the short circuit effect and why it's equivalent to $f = 0 if $f == 1. Obviously, this can impact code readability, as does using variables named only $f and $q.

Notice that it parsed the and statement (used here instead of &&) as a conditional statement.

Curiously, the code's author implicitly used Perl's default scalar, viz., $_, in the matching statement /"/, yet chose to use substr to remove its first character, instead of a substitution like s/.//.

Curiously, the code's author implicitly used Perl's default scalar, viz., $_, in the matching statement /"/, yet chose to use substr to remove its first character, instead of a substitution like s/.//.

Yes, I also found it a bit unusual to find the use of this plain vanilla use of the substr function in a piece of code that is otherwise highly Perl idiomatic and in which I would also have expected rather an s/// substitution.

But I guess I probably just do the same thing from time to time, mixing very perlish constructs with plain vanilla code.