Help for this page

Select Code to Download


  1. or download this
      DB<17> sub tst { say "@_" }
    
    ...
    
      DB<20> $i=0;tst $i++,$i,$i++        # increments return value, but i
    +nfluence alias in the middle
    0 2 1
    
  2. or download this
            $i = $i ++;
            print ++ $i + $i ++;
    
  3. or download this
    >perl -wE "$i=1; say for $i..$i++"           # 2 .. 1  (first is alias
    +, postinc returns 1 )
    
    >perl -wE "$i=1; say for $i..++$i"           # 2 .. 2  (first is alias
    +, preinc returns 2 )
    2
    ...