in reply to the ? : operator : a bug ?

$wml = defined(%stores) ? (join "<br/>\n",map("<a href='$params{URL}/o +p?optin&amp;store=$_'>$stores{$_}->{'store_t_address'}</a>" , keys %s +tores) ):"Pas de résultat<br/><br/>" ;
Any reason for this convoluted code ? and would it not be nicer as :-
if (defined(%stores)) { my @param = map("<a href='$params{URL}/op?optin&amp;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
    No particular reason, i guess it was just out of laziness that I used a not so shortcut