Thanks, for all the replys. Didn't know that you could simply reference
the last element of an array by using [-1]. This seemed like it could
be a one line task maybe two, just don't have command of the language.
Peter Scott wrote:
On Tue, 23 Aug 2005 06:17:11 -0700, I wrote:
$last_word = (split /\s/, $row->[1]//)[-1];
I seem beset by typos today. Don't know where that // came from. Should
be:
$last_word = (split /\s/, $row->[1])[-1];
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>