use warnings; use strict; use Test::More; sub my_func { my $target = shift; my @weights = @_; my @output = (); # TODO! return \@output; } is_deeply my_func(30, 7,10,13), [10,10,10]; is_deeply my_func( 5, 3,7,11), [3,3]; # TODO: lots more test cases! done_testing;