Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://132990]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (9)
As of 2016-12-09 21:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (157 votes). Check out past polls.