[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] Getting *last* line of info from file



Is there a quick way to get the last line of info of a text file into a
variable (perferrably an array) that I can use other than doing a:

while (<IN>) {
  if ($_ eq "") {
    @MyArrayValue = splice(/|/,$_);
    }
  }

or thereabout..  I am not sure about the splice command again.  fields are
separated by a  |  char, and lines separated by a  \n  character.

I write to MacPerl, even though I don't use too much macPerl part of it.
Feel free to reference it if you need to.


Thanks


-T-

timjudd@teleport.com  HTTP://www.teleport.com/~timjudd/  IRC nick: StayPuft
*NO* chain letters of any kind!    World Wide Web Page designer, ask for it
PGP available.   I'll offer to anyone who has a valid reason for needing it.