.sub {var url google.com}{slurp text {say $url} title}
Google
I suspect the $url isn't actually replaced when slurp is called in the first case, and only appears that way because it has been replaced in the response from slurp.
In the second case, I suspect say is receiving the literal string '$url', but it is replaced in the response before the outer sub-level is executed.
.sub {var url google.com}{slurp text $url title}
.sub {var url google.com}{slurp text {say $url} title}
I suspect the $url isn't actually replaced when slurp is called in the first case, and only appears that way because it has been replaced in the response from slurp.
In the second case, I suspect say is receiving the literal string '$url', but it is replaced in the response before the outer sub-level is executed.
Anyway, it's weird.