Help for this page

Select Code to Download


  1. or download this
    perl -le "print eval(print 1+1)"
  2. or download this
    2      <-- printed within the eval()
    1      <-- printed outside the eval()
    
  3. or download this
    perl -le "$i=5;print $i,eval('$i++;print $i;');print $i"
  4. or download this
    6      <-- printed outside the eval(), but AFTER it has run so $i has 
    +been incremented
    61      <-- 6 printed within the eval(), 1 printed outside
    6      <-- printed in the next statement outside the eval()