Help for this page

Select Code to Download


  1. or download this
    
                 An alternative to using substr() as an lvalue is to
    ...
                 This allows you to replace parts of the EXPR and
                 return what was there before in one operation, just
                 as you can with splice().
    
  2. or download this
    $ perl -le '$,="|";$s="foobar"; print substr($s,-2,2)="z",substr($s,-2
    +,2)'
    z|bz