# use strict; #~the newbie has used the strictures~ use warnings; use Test::More qw(no_plan); my ($result, $expected); # ~convenient way to structure your input and expected output is to ~ # ~suck in the test data, which is everything after the __DATA_ line.~ while () { #~splits a string on spaces by default; see perldoc -f split~ my ($input, $expected) = split; my $output = multiply_by_seven($input); is($output, $expected, "testing $input"); } sub multiply_by_seven { my $number = shift or die "no number"; return $number*7; } #~convenient way to structure your input and expected output, #assuming that you can use whitespace as the delimiter. __DATA__ 1 7 2 14 3 21 0 0 #### ok 1 - testing 1 ok 2 - testing 2 ok 3 - testing 3 no number at multiplyBySeven.pl line 18, line 4. 1..3 # Looks like your test died just after 3.