in reply to How do I cut single characters out of a string

Two more:
use List::MoreUtils qw/before after/; my $string = 'mystring123456'; $string = join '', (before {$_ eq 1} split //, $string), after {$_ eq +1} split //, $string;
and
my $string = 'mystring123456'; $string = join '', split /1/, $string, 2;
This last one is particularly nice: it allows you to delete the first one, first two, first three, ... characters just by changing the last number. To delete the first n occurrences, use n + 1 as the last argument of split.

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James