Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
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 the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2016-06-25 15:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (326 votes). Check out past polls.