laziness, impatience, and hubris | |
PerlMonks |
Re: Text Manipulation Quickieby grummerX (Pilgrim) |
on Aug 15, 2002 at 10:46 UTC ( [id://190358]=note: print w/replies, xml ) | Need Help?? |
Try this:
Update: For an uneven list as those Frankus mentions, this will work according to his first example, ie: 2 2 2 3 3 3 4 4 5Will return:
2 3 4 5 2 3 4 2 3You can make it work like his second example by reversing the loop:
Update (2): Got rid of pesky newlines per katgirl. -- grummerX
In Section
Seekers of Perl Wisdom
|
|