On Fri, 18 Dec 2009 02:39:07 -0500, Steve Bertrand wrote:
>> 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.
> 
> I'm content in knowing that if Uri, John, Shlomi, Shawn etc had noticed
> such a nearby side-effect, I'dve heard about it eons ago ;)

This is what I was referring to:

% perl -wle '$x=1 and die if $0 =~ /./'
Found = in conditional, should be == at -e line 1.

See the thread at <http://groups.google.com/group/perl.perl5.porters/
browse_thread/thread/6b83100782bbe891/3ea6ec3638286db8>

> > ps. even in my one-liners, I have a hell of a time not using
> strict/warnings, and I especially cringe at not lexicalizing my
> variables!

Ditto.

-- 
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