Forum Moderators: coopster & phranque

Message Too Old, No Replies

Search and replace.

$html =~ s/L/1/g;

         

Jesse_Smith

4:59 am on Jul 20, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



How do I get the search and replace to work here? I'm guessing something else needs to be added.

#!/usr/bin/perl
###########

$html =~ s/L/1/g;
$html =~ s/e/3/g;
$html =~ s/t/7/g;
$html =~ s/w/\\\/\\\//g;

if ($ENV{'QUERY_STRING'} ne '') {
$command = "$ENV{'QUERY_STRING'}";
}

print "Content-type: text/html\n\n";
if ($command eq 'page1') {
print <<EOM;
leet
EOM
}

else {
print <<EOM;
<title>leet</title>
EOM
}

MichaelBluejay

7:34 am on Jul 20, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I'm not sure what you're asking -- nor what you're trying to do. Maybe the search and replace works fine, but after changing stuff in your $html variable it doesn't look like you're actually doing anything with that variable again.