Beefy Boxes and Bandwidth Generously Provided by pair Networks vroom
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: TMTOWTDI Puzzle: Generating a range of numbers

by George_Sherston (Vicar)
on Dec 19, 2001 at 05:18 UTC ( #132990=note: print w/ replies, xml ) Need Help??


in reply to TMTOWTDI Puzzle: Generating a range of numbers

Not quite good enough for the poetry page, but it gets the job done:

my $obsession = 'Perlmonks!'; my @day; while ($obsession) { push @day, $obsession; chop $obsession; } print length $_, "\n" for reverse @day;
... or actually combining this with what Rudif did maybe:
my $obsession = 'Perlmonks!'; my @day; while ($obsession) { push @day, $obsession; chop $obsession; print scalar @day, "\n"; }


George Sherston


Comment on Re: TMTOWTDI Puzzle: Generating a range of numbers
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://132990]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2014-04-21 11:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (494 votes), past polls