Help for this page

Select Code to Download


  1. or download this
    perl -MO=Deparse -e '%a=("a",1,"b",2); print "ok" if exists $a{a} && 1
    ++exists $a{b}'
    # (%a) = ('a', 1, 'b', 2);
    ...
    perl -MO=Deparse -e '%a=("a",1,"b",2); print "ok" if exists($a{a} && 1
    ++exists $a{b})'
    # exists argument is not a HASH or ARRAY element at -e line 1.
    # NOTE same error of course w/o Deparse, also when I move ')' behind '
    +1'.
    
  2. or download this
    perl -MO=Deparse -e 'sub f {warn join "\n",@_,"",""};%a=("a",1,"b",2);
    + print "ok" if f $a{a} && 5+f $a{b}'
    # print 'ok' if f $a{'a'} && 5 + f($a{'b'});
    ...
    
    perl -e 'sub f {warn join "\n",@_,"",""};%a=("a",1,"b",2); print "ok" 
    +if f $a{a} and 5+f $a{b}'
    # output 1 2