Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: Flip-flop reset?

by swkronenfeld (Hermit)
on Aug 29, 2006 at 20:14 UTC ( #570239=note: print w/replies, xml ) Need Help??


in reply to Re: Flip-flop reset?
in thread Flip-flop reset?

The problem is not that a newline is not present, it is that (in the above case) the last line is
17: 5450  :0:0   19: 5453  :0:0   20: 14626 :0:0:D
There is not another line afterwards, but I have no text clues that that is the last line containing process information.

Here is two input samples, to hopefully make this more clear than my explanation. (The lines of hyphens are delimiters, and they are not in my input).
--------------------------------------------------------- ClientSystemName (clisysname): 'SPIFF', Client LongId: '0008027E1180,/ +epic/tst/cachesys/mgr/' PIDTAB for 128 jobs: (Job:PID:reswake:sflg[:D if dead] Job: PID:resw:SF:D 1: 5382 :0:0 2: 5384 :0:0 3: 5385 :0:0 4: 5386 :0:0 5: 5394 :0:0 6: 5387 :0:0 7: 5388 :0:0 8: 5389 :0:0 9: 5390 :0:0 10: 5391 :0:0 11: 5392 :0:0 12: 5393 :0:0 13: 5456 :0:0 14: 5444 :0:0 15: 5445 :0:0 16: 14682 :1:0:D 17: 5450 :0:0 19: 5453 :0:0 20: 14626 :0:0:D ------------------------------------------------------- ClientSystemName (clisysname): 'SPIFF', Client LongId: '0008027E1180,/ +epic/tst/cachesys/mgr/' PIDTAB for 128 jobs: (Job:PID:reswake:sflg[:D if dead] Job: PID:resw:SF:D 1: 5382 :0:0 2: 5384 :0:0 3: 5385 :0:0 4: 5386 :0:0 5: 5394 :0:0 6: 5387 :0:0 7: 5388 :0:0 8: 5389 :0:0 9: 5390 :0:0 10: 5391 :0:0 11: 5392 :0:0 12: 5393 :0:0 13: 5456 :0:0 14: 5444 :0:0 15: 5445 :0:0 16: 14682 :1:0:D 17: 5450 :0:0 19: 5453 :0:0 20: 14626 :0:0:D From Directory: /releng/b/obj/5.0.20/build6305_0_3627/linux The time is: Tue Aug 29 14:11:17 2006 . . . ------------------------------------------------------
So there can be more random junk that I don't want to include after the process list that I'm looking at. In that case, my flip flop works, however when my input ends abruptly, without the extra blank line, I don't have a way of resetting it.

Like I said above, I can just keep track of the state in a scalar, maybe that is the better way to do it. I just thought that there may be a different solution.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2022-12-06 19:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?