in reply to the ? : operator : a bug ?
Any reason for this convoluted code ? and would it not be nicer as :-$wml = defined(%stores) ? (join "<br/>\n",map("<a href='$params{URL}/o +p?optin&store=$_'>$stores{$_}->{'store_t_address'}</a>" , keys %s +tores) ):"Pas de résultat<br/><br/>" ;
if (defined(%stores)) { my @param = map("<a href='$params{URL}/op?optin&store=$_'>$store +s{$_}->{'store_t_address'}</a>" , keys %stores) $wml = join "<br/>\n", @param; } else { $wml = "Pas de résultat<br/><br/>"; }
Hope it helps
UnderMine
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: the ? : operator : a bug ?
by Sihal (Pilgrim) on Nov 21, 2002 at 13:21 UTC |