Forum Moderators: coopster & phranque

Message Too Old, No Replies

error in match line

error in match line

         

StopSpam

11:25 pm on Jul 10, 2003 (gmt 0)

10+ Year Member



hummm ..
i try to macth something here..

i made this:

exit if grep(($ENV{'HTTP_REFERER'} =~ m¦http?://([^/]*)home¦i);

it should do if referer url contains directory home then exit this script

but when i try debugg the script i get big time error:

syntax error at /home/public/cgi-bin/test.cgi line 125, near ");"

StopSpam

12:35 am on Jul 11, 2003 (gmt 0)

10+ Year Member



i now try this shorter line but it also gives syntax error ;-(

my $reff = "$ENV{'HTTP_REFERER'}";
exit if ($reff ~= /home/);

why?

StopSpam

1:44 am on Jul 11, 2003 (gmt 0)

10+ Year Member



i solved this question ..
no longer support required ...