in reply to Re^2: Refactoring: dumb or witty use of ternary operator?
in thread Refactoring: dumb or witty use of ternary operator?

Try this:
#!/usr/bin/perl use strict; use warnings; my $x; $x = $x+1; print $x;
I get:
Use of uninitialized value in addition (+) at tmp.pl line 6.
Then try:
#!/usr/bin/perl use strict; use warnings; my $x; $x = $x ? $x+1 : 1; print $x;
to see the difference...

cLive ;-)