in reply to Toggling between two values
(It is funny how many pitfalls can await one even in such a simple piece of code.)#!/usr/bin/perl -w use strict; my $limit = $ARGV[0] || 10; my @cycle = ( "you are", "I am" ); print map "\u$_\n", join(" glad ", reverse map $cycle[$_ % @cycle], 1 +.. $limit) . " glad.";
Makeshifts last the longest.
|
|---|