foreach my $num ( $point->coordinates ) { ok looks_like_number($num), "... and $num should be a number"; } #### ok my @coordinates = $point->coordinates, 'coordinates() should return the coordinates'; is scalar @coordinates, 3, '... and it should return the correct number of them'; foreach my $num ( @coordinates ) { ok looks_like_number($num), "... and each should be a number ($num)"; }