Help for this page

Select Code to Download


  1. or download this
    my $ref = eval { defined($asset->{related_files}) ? decode_json($asset
    +->{related_files}) : []; };
    
  2. or download this
        print "Exists\n"    if exists $hash{$key};
        print "Defined\n"   if defined $hash{$key};
        print "True\n"      if $hash{$key};
    
  3. or download this
    $ perl -Mstrict -Mwarnings -E 'my $x; eval { my $y = defined $x ? 1 : 
    +0; }; say $@ if $@; say $y;'
    Global symbol "$y" requires explicit package name at -e line 1.
    ...
    
    $ perl -Mstrict -Mwarnings -E 'my $x; my $y = eval { defined $x ? 1 : 
    +0; }; say $@ if $@; say $y;'
    0