Help for this page

Select Code to Download


  1. or download this
    $\ = "\n";
    $, = ",";
    print 'a string' =~ m/(.(?{pos()+=4}))/g;
    __END__
    prints "a, ,s,t,r,i,n,g". It should print "a,i"
    
  2. or download this
    '14567890ab' =~
      m/(.(?{$char = substr($_,pos(),1);
    ...
    > 8 "a" +0 <  8 "a" ->  8
    > 9 "b" +0 <  9 "b" ->  9
    > 10 "" +0 < 10 "" -> 10
    
  3. or download this
    __SIG__
    use B;
    printf "You are here %08x\n", unpack "L!", unpack "P4", pack
      "L!", B::svref_2object(sub{})->OUTSIDE;