$foo = $bar unless $foo;
My solution was something like:
$foo ||= $bar || "Catch";
I tried explaining this by using both
$result = open(FOO,"<..") || "Oops";
$a = $a + 1; versus $a += $1;
It slowly sunk in. The
unless bit reminded me of a section in the Perl Best Practices book I'm reading. Thanks Damian! I pointed out some extra funny bits by bringing in the C-style short hand for if-then-else. Maybe I was doing this to get a 5 minute break from work..