tkguifan has asked for the wisdom of the Perl Monks concerning the following question:
sub set_piece_at_pos { my $self=shift; my $pos=shift; my $piece=shift; my @rep=split //,$self->{rep}; $rep[$pos]=$piece; $self->{rep}=join('',@rep); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Can you set a character in a string at a given index directly?
by blindluke (Hermit) on Feb 03, 2015 at 15:52 UTC | |
by tkguifan (Scribe) on Feb 03, 2015 at 16:08 UTC | |
by MidLifeXis (Monsignor) on Feb 03, 2015 at 16:12 UTC | |
|
Re: Can you set a character in a string at a given index directly?
by Corion (Patriarch) on Feb 03, 2015 at 15:53 UTC | |
|
Re: Can you set a character in a string at a given index directly?
by Athanasius (Archbishop) on Feb 03, 2015 at 16:26 UTC | |
by tkguifan (Scribe) on Feb 03, 2015 at 16:40 UTC | |
by Athanasius (Archbishop) on Feb 03, 2015 at 16:46 UTC |