Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
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 browsing the Monastery: (4)
As of 2015-07-05 14:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (67 votes), past polls