in reply to Re: Re: undefined question
in thread undefined question
You'd find that described under "regular expressions". As an example,
can be rewriten (assuming $process holds an alphanumeric string) asopen(PROCS, "ps -a | grep $process |"); while ( my $proc = <PROCS> ) { # ... }
Regular expressions are your friends. Learning about them pays off in many ways.open(PROCS, "ps -a |"); while ( my $proc = <PROCS> ) { next if $proc !~ /$process/; # ... }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: undefined question
by Anonymous Monk on Jun 09, 2003 at 06:39 UTC |