Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^4: Read Pipe, Never Enters While Loop

by ImJustAFriend (Scribe)
on Jun 05, 2017 at 13:03 UTC ( [id://1192163]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Read Pipe, Never Enters While Loop
in thread Read Pipe, Never Enters While Loop

I added the code to die if open failed, and it doesn't die. Looks to me like open is working?

open (PRM, "-|", $NE_obj->cmd("ssh $activepilotrcs reboot ; tailer PRM +")) or die "Could not open PRM: $!\n";; while (<PRM>) { print "DEBUG: $_\n"; if ($_ =~ m/.*FAILED HEARTBEAT.*/sxi) { print "$spacer $spacer $spacer $spacer Alarm Received That Act +ive Pilot Has Gone Down...\n"; } elsif ($_ =~ m/.*STARTING OA&M LEAD TRANSITION.*/sxi) { print "$spacer $spacer $spacer $spacer Standby Pilot $stdbypil +otrcs Has Started Transitioning To Active...\n"; } elsif ($_ =~ m/.*FAILOVER INITIALIZATION COMPLETED.*/sxi) { print "$spacer $spacer $spacer $spacer Standby Pilot $stdbypil +otrsc Has Transitioned To Active...\n"; $NE_output = $NE_obj->cmd("\003"); last; } else { next; } }

Replies are listed 'Best First'.
Re^5: Read Pipe, Never Enters While Loop
by ImJustAFriend (Scribe) on Jun 05, 2017 at 13:54 UTC

    Never mind, I changed the code to just tail a file and a foreach loop to print the lines read by tail... and got back a "File not found" message...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1192163]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (8)
As of 2024-04-23 10:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found