in reply to how to execute 'tmboot -y'

I have another question about string match, when I get the output I have code as below to find a string, but the system just hauled, nothing comes back.
open (FILE, "<<", $input;) while( <FILE>) { if (/"running"/s) {print "found";} }

Replies are listed 'Best First'.
Re^2: how to execute 'tmboot -y'
by roboticus (Chancellor) on Jul 25, 2017 at 20:14 UTC

    ytjPerl:

    Does your input actually contain the word running with quotes around it? If not, then remove the quotes from your regex.

    Also the input mode "<<" looks ... unusual. Are you sure you're doing it right? You might want to check for errors on your open.

    Your code is also syntactically goofy and has no chance of actually running. Next time, you might actually cut and paste the code in from your example, rather than rekeying it poorly.

    ...roboticus

    When your only tool is a hammer, all problems look like your thumb.