Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl use warnings; use strict; my $str = "abc xxxssyy zx"; $str =~ s/(.)/($1 eq 'b' | $1 eq 'z' | $1 eq 'y')? "" : $1/egs; print $str;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: remove multiple characters
by bart (Canon) on Dec 04, 2007 at 10:52 UTC | |
by Punitha (Priest) on Dec 04, 2007 at 11:07 UTC | |
by bart (Canon) on Dec 04, 2007 at 11:11 UTC | |
Re: remove multiple characters
by fenLisesi (Priest) on Dec 04, 2007 at 10:58 UTC |