LineNumber not reporting correctly
hi everyone i've been working on side project of mine helps me learn powershell , incorporate other languages, , i've hit bit of roadblock. my powershell script reads latest entry (the last line) of logfile everytime logfile has been updated. when logfile updates, script reads last line of logfile , searches 2 specific words; gamestart , gameend. once finds 'gamestart' supposed remember linenumber , continue read latest entries until finds 'gameend' , remember linenumber. problem i'm having no matter line position, gamestart report linenumber 0 , gameend relevant position of gamestart, , not actual linenumber. (so if gameend found 77 lines down, reports linenumber 77 not actual linenumber) i'm using section of code monitor logfile updates: http://dereknewton.com/2011/05/monitoring-file-system-changes-with-powershell/ for testing purposes, have below lines confirm if position of gamestart , gameen...