Help for this page

Select Code to Download


  1. or download this
    # (a) could change entirely if run multiple times
    ( rand < .5 ? $a : $b ) = ( rand < .5 ? $a : $b );
    
    ...
    # (a) might have side effects
    tie $a, ...;
    ($a) = $a || foo();
    
  2. or download this
    perl -MO=Concise -e '($a) ||= foo()' | idealized-optree
    
    leave
    ...
                entersub # foo()
                      pushmark
                         gv # *foo