RE: To quotes or not quotes parameter

2003-09-29 Thread Thomas Bätzler
[EMAIL PROTECTED] <[EMAIL PROTECTED]> asked:
> what is the proper way to pass a parameter for something like
> $cgi-param(username)?
> 
> as far as i know it, this works for me:
> 
> $cgi-param(username);

Don't do that. Using barewords as strings can
break your code if you later on introduce a
sub with the same name in your code. Besides,
this obviously doesn't work for Perl reserved
words anyways.

Instead, use either:

> $cgi->param("username");
> $cgi->param('username');

HTH,
Thomas

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



To quotes or not quotes parameter

2003-09-29 Thread perl
what is the proper way to pass a parameter for something like
$cgi-param(username)?

as far as i know it, this works for me:

$cgi-param(username);
$cgi->param("username");
$cgi->param('username');

thanks,
-rkl

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]