Help for this page

Select Code to Download


  1. or download this
    substr($_, 3, 2) = 'foo';
    
  2. or download this
    substr($_, 3, 2, 'foo');
    
  3. or download this
    my $ref = \substr($_, 3, 2);
    $$ref = 'foo';
    
  4. or download this
    >perl -MDevel::Peek -e"$_ = 'abcdef'; my $ref = \substr($_, 3, 2); Dum
    +p($$ref);"
    SV = PVLV(0x4d3d24) at 0x2cb29c      <--- PVLV
    ...
        PV = 0x2cab94 "abcdef"\0
        CUR = 6
        LEN = 12