for my $n (1..30) { ... push(@nums, $s->numerator); push(@denoms, $s->denominator); }