in reply to Odd (literally) problems with HTML::Template and params

The problem is that param() is sensitive to context. If you call it in a list context (which you are), and there's no value, then it returns an empty list (that is, zero items). This is different than returning undef (which would be one item). If you really want just one item from param(), call it in scalar context:

$template->param( STYLE_SHEET => "$STYLE_SHEET", SCRIPT_LOCATION => "$SCRIPT_LOCATION", MEMBER_NAME => scalar( $q->param('realname') ) );

Replies are listed 'Best First'.
Re: Re: Odd (literally) problems with HTML::Template and params
by legLess (Hermit) on Jul 10, 2001 at 22:16 UTC
    *Cough* Gee, legLess, does the work "duh" mean anything to you? Thanks for the gentle clue-stick, bikeNomad.
    --
    man with no legs, inc.