# syntax lvalue ?= op value; # ex: $lowest = $_ if $lowest > $_; $lowest ?= > $_; # ex: $highest = substr($_, 10, 5) if $highest lt substr($_, 10, 5) $highest ?= lt substr($_, 10, 5); # ex: $foo ||= $bar, using the generalized ?= operator $foo ?= || $bar; #### # ex: $foo = $default if !defined($foo) $foo ?= !defined $default; # ex: $foo{'bar'} = $default if exists($foo{'bar'}) # That is, we're resetting the value, but not creating it $foo{'bar'} ?= exists $default; #### # $foo = uc($foo) $foo ?= uc; # even do arrays! @arr ?= reverse; #### # $foo = 5 if -$foo? # $foo = $foo - 5 if $foo - 5? $foo ?= - 5; #### $foo{$bar}{$baz} ?= -;