Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: find and replace

by vivid (Beadle)
on Dec 21, 2007 at 09:36 UTC ( #658413=note: print w/replies, xml ) Need Help??


in reply to find and replace

Try this

my %aff; while($str=~/<affiliation id="([^"]*)"><label>(.+?)<\/label>/sgi){ $aff{$1}=$2; } for my $affid (sort keys %aff){ $str=~s#(<crossRef refid=")(">\Q$aff{$affid}\E</crossRef>)#$1$affid$2# +sgi; }

Vivid

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://658413]
help
Chatterbox?
[Corion]: Huh. I wasn't aware that you cannot segregate Python 2 and Python 3 modules... Hopefully Perl 6 module use C6AN and thus avoid the problem...
[hippo]: I very much hope so.
[moritz]: there are already some (very few) Perl 6 modules on CPAN, but in a way that the p5 indexer avoids them
[hippo]: It's confusing enough to have the Perl6:: namespace which isn't for Perl6 but for features from that ported into Perl.

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (7)
As of 2017-01-24 09:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (203 votes). Check out past polls.