I can reproduce this, exactly as he says below. Some kind of
incompatibility between mod_perl and the Switch module?
william wrote:
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
[EMAIL PROTECTED]:/var/www/modperl$ perl test.pl
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
--
---------------------------------------------------------
CCCCC CableWholesale.com, Inc.
_ CC CC P.O. Box 11775
| CC ------------------ m Pleasanton, CA 94588
| CC 888-212-8295 o
|_ CC ================== c 1-888-212-8295 Phone
CC CC CableWholesale . 1-925-455-0808 Fax
CCCCC www.cablewholesale.com
---------------------------------------------------------