By using the
&& operator, you're pretty much guaranteeing that the first regex will be done first, and the second will be done next. It's safe to assume
$1 and
$2 will be set, assuming the second regex succeeds. There are other Perl constructs, though (such as lists), where each expression in the list isn't necessarily guaranteed to be evaluated in the obvious order.