Help for this page

Select Code to Download


  1. or download this
    my @a = qw( a b c d e );
    make_view( \my @v, \@a, 2, 2 );  # @v -> splice( @a, 2, 2 );
    @v = qw( x y z );
    print( "@a\n" );  # a b x y z e
    
  2. or download this
    my $a = 'abcde';
    substr( $a, 2, 2 ) = 'xyz';
    print( "$a\n" );  # abxyze