Technically $foo also delimits at both ends, the second character is just a newline or whitespace character. However with %foo% it is unambiguous where the variable begins and ends.
Also I said newline or whitespace, what about special characters?
Look at $foo+$bar am I adding two variables together? Is the first variable $foo or $foo+?
Technically
$fooalso delimits at both ends, the second character is just a newline or whitespace character. However with%foo%it is unambiguous where the variable begins and ends.Also I said newline or whitespace, what about special characters?
Look at
$foo+$baram I adding two variables together? Is the first variable$fooor$foo+?