So I’ve extracted the digits from a log file and it looks like this:
2011 04 13 23 54 14 601 04 13 23 54 14 10 35 1 14 8080 59 250
What I’m trying to get is the last number (250), and it will loop through each line of the log. Once I get the last number from each line, I will do some calculations…I just can’t extract that last number at the end of the line. Thanks!
If your data is an array,
@digits, then the last one is$digits[-1].If your data is in a string, use the
splitto get it into an array.