in reply to Re^2: Syntax error with use constant and switch with comment between
in thread Syntax error with use constant and switch with comment between
I propose the config file change. I trust that the given-when construct is a different animal inside than switch-case.
It is a switch statement
given ($convention) { when ('E') { print "east longitude $long radians\n"; } when ('W') { $long = TWOPI-$long; print "west longitude $long radians\n"; } default { print "error: $convention not valid\n"; } }
But it doesn't have to do its own Perl parsing like Switch because it's a builtin control statement like for and while.
|
|---|