Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: A small queestion to match processes

by jwkrahn (Abbot)
on Oct 05, 2012 at 18:41 UTC ( [id://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 - perldoc.perl.org. 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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2024-04-24 04:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found