Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Variables in Regular Expressions?

by KM (Priest)
on Apr 25, 2001 at 23:39 UTC ( [id://75584]=note: print w/replies, xml ) Need Help??


in reply to Variables in Regular Expressions?

Why are you using tr at all? This is likely best done with s///

$c =~ s!$a!$b!;

Cheers,
KM

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (4)
As of 2024-03-28 22:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found