#!/usr/bin/perl use strict; use warnings; my $string = 'This is string'; my $capture1 = $string, 6, 2, "is stretched"; # This will substitute as expected my $capture2 = $string, 9, 6, 'STRING'; # Now here original string will be updated and positions I have already are of no use. __END__ Useless use of a constant (6) in void context at C:\test.pl line 6. Useless use of a constant (2) in void context at C:\test.pl line 6. Useless use of a constant ("is stretched") in void context at C:\test.pl line 6. Useless use of a constant (9) in void context at C:\test.pl line 7. Useless use of a constant (6) in void context at C:test.pl line 7. Useless use of a constant ("STRING") in void context at C:\test.pl line 7. Process completed successfully