sub Last_N_Lines { my ($str, $n) = @_; return join "\n", grep {defined} (split "\n", $str)[-$n .. -1]; }
In reply to Re: Extract Multiple Lines from the End of a multi-line string
by GrandFather
in thread Extract Multiple Lines from the End of a multi-line string
by NateTut
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |