Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: using variables in regular expr replace

by Eimi Metamorphoumai (Deacon)
on Dec 02, 2004 at 17:53 UTC ( #411884=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $line =~ s/\Q$var2\E/$var1/;
    
  2. or download this
    my $line = <<"HTML";
    <a href="/{HOST}?action">123</a>:</b><br>[img-smile "58-41" ":)"]
    HTML
    chomp $line;
    
  3. or download this
    my $line = qq#<a href="/{HOST}?action">123</a>:</b><br>[img-smile "58-
    +41" ":)"]#;
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (7)
As of 2014-11-23 20:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (134 votes), past polls