in reply to TMTOWTDI Puzzle: Generating a range of numbers
... or actually combining this with what Rudif did maybe:my $obsession = 'Perlmonks!'; my @day; while ($obsession) { push @day, $obsession; chop $obsession; } print length $_, "\n" for reverse @day;
my $obsession = 'Perlmonks!'; my @day; while ($obsession) { push @day, $obsession; chop $obsession; print scalar @day, "\n"; }
|
|---|