in reply to Dynamic menu options

I think this is a *much* better approach-

use warnings; use strict; use CGI qw(:standard); my @acc = qw( 12345 67895 123445 112288 3736666 445899 ); print popup_menu({ -name => "account", -values => \@acc, });

.= in HTML/string generation is a danger sign (in my book; it's on sale, 2¢ this week).

Replies are listed 'Best First'.
Re^2: Dynamic menu options
by Anonymous Monk on Jul 29, 2010 at 03:09 UTC
    What do you mean danger sign? Besides, that was a typo on OPs part, using . instead of ;

      ".=" wasn't a typo. Concatting strings like that has, to me at least, a huge code smell. It's a sign that you are doing things in a suboptimal, if not terrible, way.