Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Re: A small queestion to match processes

by jwkrahn (Monsignor)
on Oct 05, 2012 at 18:41 UTC ( #997531=note: print w/replies, xml ) Need Help??

in reply to A small queestion to match processes

#obtain the length to match according to ps aux { print "#Enter the block just once\n"; last if $strindex; $strindex = index($_, "STAT"); #obtain how characters the RegEx should not match } #no more of this besides the first line

A simpler way to do that:

$strindex = $-[0] if ?STAT?;

Replies are listed 'Best First'.
Re^2: A small queestion to match processes
by heatblazer (Scribe) on Oct 05, 2012 at 18:46 UTC

    Thank you, will look into it ASAP. Still unknown syntax to me.

      G'day heatblazer,

      It would have been useful if you specified which syntax you didn't know about. Here's a couple of guesses:

      Also, take a look at perl - Here you'll find links to all the Perl manual pages. I wouldn't suggest attempting to learn everything in all that documentation; rather, just get a feel for where that information can be found. Once you are familiar with what's available, looking up specifics is usually a fairly easy task.

      -- Ken

        Thank you, I`ll look into these. I was just in a hurry before the idea blows off my head ( as usually happens ), so when I get better, I`ll rewrite it the lazy way :)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://997531]
and a moth chases the moon...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2018-03-24 03:14 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (297 votes). Check out past polls.