perlquestion
Anonymous Monk
hello<br>
in the following code which will remove 'b', 'z', 'y' from the string i can't simplify the:<br>
($1 eq 'b' | $1 eq 'z' | $1 eq 'y') to a more concise one <br>
any suggestions, thanks
<code>
#!/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;
</code>
4