in reply to Re: Parsing from another program (stream)
in thread Parsing from another program (stream)

LanX -
yep, 'Print' is 'print'. I pulled it off to format and some MS-auto-corruptor pretty-print capitalized start words.
(file-not-found) I could quiet that with a chdir, sometimes. - I tried pointing to the full path, that didn't work. The file is there, but various implementations of 'open' throw that. I see a fair number of other folks fighting that. But I think 'open' is the wrong tool anyway.
As for 'slurp', not the best term, I get it. The issue I have is there will NEVER be an EOF. I am reading gas usage as reported by the meter. And I can't close the file, either.
So, is there no other way to parse the output of another application as it is presented??
  • Comment on Re^2: Parsing from another program (stream)

Replies are listed 'Best First'.
Re^3: Parsing from another program (stream)
by LanX (Saint) on Feb 27, 2022 at 21:43 UTC
    > But I think open is the wrong tool anyway.

    I used this approach in the past with great success! 🤷🏽

    Maybe try providing an absolute path to the executable.

    edit

    > The issue I have is there will NEVER be an EOF.

    I expect that you get an EOF at least when the process exits or dies. And this case should be covered IMHO.

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery