Hemond, Steve wrote:
> 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?
>
Again, that regexp works just fine. (If you're setting $cmd properly...)
Something else must be wrong that you're not sending in your email
requests. Send the actual code.
#!/usr/bin/perl -w
use warnings;
use strict;
while (<DATA>) {
chomp;
(/dispatch genie/) ? print "Hit\n" : print "Miss\n";
}
__DATA__
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
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>