Although it turned out not to be what was going on here, just to address 
your subject line' it's not just Perlcritic that will complain about 
assignment in a conditional, but also warnings:

% perl -wle 'print 42 if $x = 0'
Found = in conditional, should be == at -e line 1.

And of course you should always have warnings enabled, and always make 
sure your program doesn't output any.

Note that there is or at least used to be also a side effect in perl that 
would cause that warning if there was an assignment "nearby" a 
conditional, even if not where you'd think it ought to be to complain.  I 
forget the details exactly and haven't hit it again in eons.

-- 
Peter Scott
http://www.perlmedic.com/
http://www.perldebugged.com/
http://www.informit.com/store/product.aspx?isbn=0137001274

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to