On Tue, Sep 30, 2008 at 02:31:46PM +1000, Jacinta Richardson wrote:
> Carl Mäsak wrote:
> > The "correct" form using junctions would be this:
> >
> > die "Unrecognized directive: TMPL_$directive"
> > if $directive ne 'VAR' & 'LOOP' & 'IF';
>
> which makes sense, because this does give us:
>
> $directive ne 'VAR' && $directive ne 'LOOP' && $directive ne 'IF'
Just for pedantic clarity, what C< $directive ne 'VAR' & 'LOOP' & 'IF' >
really gives is
all( $directive ne 'VAR', $directive ne 'LOOP', $directive ne 'IF' )
In other words, the result of the expression is an all() Junction.
In boolean context this would indeed evaluate to false if $directive
has any of the values 'VAR', 'LOOP', or 'IF'.
Pm