Alter syntax of test for defined
Reduce code in test calling "slurp"

Just use scalar context from the get-go.