Java Mailing List Archive

http://www.apache-httpd.com/

Home » modperl.perl »

Syntax error in mod_perl but not in shell command

william

2008-05-29

Replies: Find Java Web Hosting

Author LoginPost Reply
Hello, I am running this code

print "Content-type: text/html\n\n";

use Switch;
$t =1;

switch ($t) {
   case 1    { print "number 1\n"; }
}

I have not problem running in shell command
william@(protected)
Content-type: text/html

number 1

But when I ran in mod_perl , I got error
[Thu May 29 14:48:16 2008] [error] syntax error at
/var/www/modperl/test.pl line 6, near ") {"\nNumber found where
operator expected at /var/www/modperl/test.pl line 7, near "case
1"\nsyntax error at /var/www/modperl/test.pl line 8, near "}\n}"\n


Thanks
©2008 apache-httpd.com - Jax Systems, LLC, U.S.A.