my $foo = 'HelloWorld!'; my @bar; do { chop $foo; push @bar, length $foo } while ($foo); pop @bar; @bar = reverse @bar; @bar;
Not the most original, probably, but it works.
In reply to Re: TMTOWTDI Puzzle: Generating a range of numbers
by premchai21
in thread TMTOWTDI Puzzle: Generating a range of numbers
by Masem
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |