Help for this page

Select Code to Download


  1. or download this
    if (ref $test[1] and exists $test[1][1]) {}
    
  2. or download this
    sub iff_ref {
      return ref $_[0] ? $_[0] : undef;
    ...
    if (exists iff_ref($test[1])->[1]) {}
    # or it might have to be
    if (exists ${iff_ref($test[1])}[1]) {}