cidaris has asked for the wisdom of the Perl Monks concerning the following question:
I have a giant chunk of HTML, tags, quotes and all. I have done this:
I cannot get $page =~ s/$old_text/$new_code/g to work for the life of me. Should I use quotemeta instead, or simply 'q' instead of 'qq'.
Thanks
Aaron
my $page = ## the contents of the entire page in a string ##; my $old_text = qq ( LOTSOFHTML ); my $new_code = qq ( LOTSTOREPLACEWITH );
I cannot get $page =~ s/$old_text/$new_code/g to work for the life of me. Should I use quotemeta instead, or simply 'q' instead of 'qq'.
Thanks
Aaron
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: correct usage of q, quotemeta, with s///
by I0 (Priest) on May 31, 2002 at 00:58 UTC | |
Re: correct usage of q, quotemeta, with s///
by Joost (Canon) on May 31, 2002 at 09:36 UTC | |
Re: correct usage of q, quotemeta, with s///
by termix (Beadle) on May 30, 2002 at 22:36 UTC | |
by cidaris (Friar) on May 30, 2002 at 23:52 UTC |
Back to
Seekers of Perl Wisdom