Okay, here`s the real problem,
# ps -efA |grep dispatch
cspenard 33958 45716 0 09:08:05 pts/8 0:00 /prog/gena/8.1.1/bin/dispatch genie -u
/prog/gena/impress/gui/im
msirois 37212 9842 0 08:41:17 pts/1 0:04 /prog/gena/8.1.1/bin/dispatch genie -u
/prog/gena/impress/gui/im
My script passes each process and when it finds "dispatch genie" it holds its data in
a hash table.
As you can see, dispatch genie is found in these two columns.
if ($cmd =~ /dispatch genie/) {
That returns absolutely nothing.
Why?
Steve Hemond
Programmeur Analyste / Analyst Programmer
Smurfit-Stone, Ressources Foresti�res
La Tuque, P.Q.
Tel.: (819) 676-8100 X2833
[EMAIL PROTECTED]
> -----Original Message-----
> From: drieux [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, December 17, 2003 11:24 AM
> To: Perl Perl
> Subject: Re: Regular expressions
>
>
>
> On Dec 17, 2003, at 7:59 AM, Hemond, Steve wrote:
> [..]
> > I am searching this way :
> > if ($text =~ /one two/)
> >
> > What I am doing wrong?
>
> ok, I bite, what is the problem?
>
> given
> #!/usr/bin/perl -w
> use strict;
>
> while ( <DATA> ) {
> my $text = $_;
> if ($text =~ /one two/)
> {
> print "line is ok:\n\t$text";
> } else {
> print "WRONG!\n\t$text";
> }
> }
>
> __DATA__
> If 'one two' is found, it is okay.
> If 'one' is found, it is incorrect.
> If 'two' is found, it is also incorrect.
>
> we get
> line is ok:
> If 'one two' is found, it is okay.
> WRONG!
> If 'one' is found, it is incorrect.
> WRONG!
> If 'two' is found, it is also incorrect.
>
> What Problem?
>
>
> ciao
> drieux
>
> ---
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>