use strict; use Tie::Cycle; my $monkeys = 5; tie my $parent, 'Tie::Cycle', [ qw(Mama Papa) ]; tie my $head_owner, 'Tie::Cycle', [ qw(his her) ]; tie my $s, 'Tie::Cycle', [ ('s') x ($monkeys-1), '' ]; tie my $doctors_words, 'Tie::Cycle', [ ('"No more monkeys jumping on the bed!"') x ($monkeys-1), '"Put those monkeys straight to bed!"' ]; print qq( $monkeys little monkey$s jumping on the bed, One fell off and bumped $head_owner head. $parent called the Doctor and the Doctor said, $doctors_words ) and $monkeys-- while $monkeys;