in reply to CGI and why?

Two reasons come to mind. First, you can't really manipulate the values (to untaint them) as param() isn't an lvalue. Second, the context is unambiguously scalar in this case. In a print statement, it may be unintentionally list.

Oh, and a third might be for the efficiency of not calling a method repeatedly.

Replies are listed 'Best First'.
Re: Re: CGI and why?
by Sifmole (Chaplain) on Dec 31, 2002 at 21:20 UTC
    I can see your first two points, but you could untaint by using the param methods ability to set a value right?
    $q->param('varname', untaintit($q->param('varname')));

    Your third point I can accept, except that in most cases where I see this the last performance issue that the code has is the method calls to $q