[rt-users] help with scrip

Gene LeDuc gleduc at mail.sdsu.edu
Thu Oct 16 13:07:41 EDT 2008


Actually I think you should put the || phrase in parentheses like so:

> > if ($self->TransactionObj->Type eq "Create" &&
> >   ($self->TicketObj->Subject !=~ /[P|p]roje[c|k]t: / ||
> >   $self->TicketObj->Subject !=~/[A|a]kut: / ) )

I'm pretty sure that && is a higher precedence than ||, so the result 
without parentheses would be the same as ( ( A && B ) || C ) instead of ( A 
&& ( B || C )) which is what you described.

At 08:31 AM 10/16/2008, Violetta Wawryk wrote:

> > my code looks like this:
> >
> > if ($self->TransactionObj->Type eq "Create" &&
> > $self->TicketObj->Subject !=~ /[P|p]roje[c|k]t: / ||
> > $self->TicketObj->Subject !=~/[A|a]kut: / )
> > --snip--
>
>sorry, for bothering you. it actually works, the problem was something
>else in my code which prevented my scrip to run through.
>
>Bye
>Violetta

-- 
Gene LeDuc, GSEC
Security Analyst
San Diego State University 




More information about the rt-users mailing list