in reply to Issues with substr and substituting

You are substituting - why don't you use the four-argument version of substr directly, or the lvalue form?

substr($sequence, $j, 1) = 'T';

Replies are listed 'Best First'.
Re^2: Issues with substr and substituting
by lecb (Acolyte) on Sep 27, 2016 at 16:22 UTC

    Thank you kindly Corion, I didn't realise I could do that! Works a treat now!! Thank you again very much.