- or download this
@q = split(/(.*?)/, $p);
- or download this
@q = split(//,$p);
- or download this
foreach (@q) {
- or download this
@q = split (//, $p);
foreach (@q) {
...
}
$out = join ("", @q);
print "out === $out";
- or download this
foreach (@q) {
if ($_ eq $matchchar) {
...
}
}
}
- or download this
foreach (@q) {
if ($_ eq $matchchar && ++$count >= $nummatch) {
$_ = $repchar;
}
}
- or download this
foreach (@q) {
$_ = ($_ eq $matchchar && ++$count >= $nummatch)?$repchar:$_;
}
- or download this
@q = map { ($_ eq $matchchar &&
++$count >= $nummatch)?$repchar:$_ } @q;
- or download this
@q = map { ($_ eq $matchchar &&
++$count >= $nummatch)?$repchar:$_ }
split(//, $p);
- or download this
$out = join ("",
map { ($_ eq $matchchar &&
++$count >= $nummatch)?$repchar:$_ }
split (//, $p));