#!/usr/bin/perl use strict; use Tie::Cycle; tie my $parent, 'Tie::Cycle', [ qw(Mama Papa) ]; tie my $head_owner, 'Tie::Cycle', [ qw(his her) ]; my $monkeys = 5; do { print "$monkeys little monkeys jumping on the bed,\n"; print "One fell off and bumped $head_owner head.\n"; print "$parent called the Doctor and the Doctor said,\n"; (--$monkeys) ? print "\"No more monkeys jumping on the bed!\" +\n\n" : print "\"Put those monkeys straight to bed!\"\n\n\n"; } while ($monkeys);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Five litte Tie::Cycle Monkeys
by codeacrobat (Chaplain) on Nov 21, 2007 at 22:24 UTC | |
|
Re: Five litte Tie::Cycle Monkeys
by bart (Canon) on Nov 21, 2007 at 23:07 UTC | |
by codeacrobat (Chaplain) on Nov 22, 2007 at 00:31 UTC | |
by KurtSchwind (Chaplain) on Nov 24, 2007 at 13:12 UTC |