use Test::More; sub _test_bug_exists { my $args = shift; my $bug = get_bug( $args->{bug} ); subtest 'Lookup existing bug' => sub # this is line 241 { is( $bug->{response}, "$c->{bug_tracker}/$args->{bug}", "URL correct?" ); is( $bug->{subject}, "Variables not expanded inside array", "Subject correct?" ); } } String found where operator expected at ./cfbot.pl line 241, near "subtest 'Lookup existing bug'" (Do you need to predeclare subtest?) syntax error at ./cfbot.pl line 241, near "subtest 'Lookup existing bug'" Global symbol "$bug" requires explicit package name at ./cfbot.pl line 244. syntax error at ./cfbot.pl line 245, near "}" Illegal declaration of subroutine main::_test_bug_not_found at ./cfbot.pl line 248.