Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Replace characters within string

by Anonymous Monk
on Sep 07, 2022 at 23:42 UTC ( [id://11146759]=note: print w/replies, xml ) Need Help??


in reply to Replace characters within string

Stuff like [I|O|P|B|M] doesn't do what you think it does. In character classes (the square brackets) the pipe character is a literal pipe character, not an operator. So you should write [IOPBM].

See "Special Characters Inside a Bracketed Character Class" in perlrecharclass for details.

Yet another proof that Guido was right.

Are these characters amino acids or something? It's a good thing that Perl is still used by geneticists, otherwise we would've already been exterminated by engineered diseases.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11146759]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (7)
As of 2024-04-25 15:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found