foreach (@items) { ... a lot of perl code ... unless (some condition) { $err = "Splunk is missing from Foobar"; } } if ($err) { # <------- line 60 fail($err); } else { pass("Fancy code passed"); } #### $ ./t/test.pl t/DB/SearchPart.t t/DB/SearchPart....NOK 3 # Failed test (t/DB/SearchPart.t at line 60) # Looks like you failed 1 test of 3. t/DB/SearchPart....dubious Test returned status 1 (wstat 256, 0x100) Scalar found where operator expected at (eval 158) line 1, near "'int' $__val" (Missing operator before $__val?) DIED. FAILED test 3 Failed 1/3 tests, 66.67% okay Failed Test Stat Wstat Total Fail Failed List of Failed ------------------------------------------------------------------------------- t/DB/SearchPart.t 1 256 3 1 33.33% 3 Failed 1/1 test scripts, 0.00% okay. 1/3 subtests failed, 66.67% okay.