Help for this page

Select Code to Download


  1. or download this
    package MyEmptyTrueVar;
    our $singleton;
    ...
      cmp  => sub { !ref $_[1] }; # unequal to empty string, or any other 
    +string
    
    bless $singleton=\$singleton;
    
  2. or download this
    say "Single str='$MyEmptyTrueVar::singleton', Num=", (0+$MyEmptyTrueVa
    +r::singleton)
       if $MyEmptyTrueVar::singleton &&
       $MyEmptyTrueVar::singleton ne '' &&
       '' ne $MyEmptyTrueVar::singleton;