use strict; use warnings; use feature 'state'; use Test::More tests => 1; my $in = 'A |simple*example| is |so*simple| to come*up |with these*days|'; my $want = 'A |simple-example| is |so-simple| to come*up |with these-days|'; my $have = join '|', map { state $i = 0; $i++ % 2 and s/\*/-/g; $_ } split /\|/, $in, -1; is $have, $want;
🦛
In reply to Re^5: s///g within m//g regions
by hippo
in thread s///g within m//g regions
by almr
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |