Oops,
# Keep the last 5. if (@sets > 5) { @sets = @sets[-5..-1]; }
should be
# Keep the first 5. if (@sets > 5) { @sets = @sets[0..4]; }
It's a remenant of an incorrect version I wrote before posting.
(I updated my earlier post to remove the error.)
In reply to Re^3: truncating a text file
by ikegami
in thread truncating a text file
by dankichi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |