SPUG: CGI.pm popup_menu()?

Altman, Brian brian.altman at attws.com
Wed Oct 25 15:36:43 CDT 2000

	I have some experience with Perl programming but little with the
CGI.pm module. What I am trying to do is create a dynamic HTML form. What I
mean by dynamic is that I want a select form item to be created using
option's from a .csv file. I can read the file into an array, but I haven't
figured out how to store each array item into the value list of the
popup_menu() function. Can anyone help me on this? My code so far looks

	open(LOCATION,"< Location.csv") or die "Couldn't read Location.csv:
	while(<LOCATION>) {
		push (@Location, $_);

print popup_menu(-name=>'Location',-values=>@Location); #But this only
returns the first item in the array.


 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     POST TO: spug-list at pm.org       PROBLEMS: owner-spug-list at pm.org
      Subscriptions; Email to majordomo at pm.org:  ACTION  LIST  EMAIL
  Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
 For daily traffic, use spug-list for LIST ;  for weekly, spug-list-digest
  Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/

More information about the spug-list mailing list