damian1301 has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl -w use CGI qw(param); use diagnostics; use strict; my $query = new CGI; if ($query->param()) { foreach $key (sort {$a cmp $b} $query->param) { print "<STRONG>$key</STRONG> = "; my @values = $query->param($key); print join(", ",@values),"<BR>\n"; } }else{ print "Content-type:text/html\n\n"; print qq~ <HTml><head><title>Alphabetical Sorter</title></head> <body><h2 align="center">Alphabetical Sorter.</h2> <form method="post"> <input type="text" name="1"><Br> <input type="text" name="2"><Br> <input type="text" name="3"><Br> <input type="text" name="4"><Br> <input type="text" name="5"><Br> <input type="submit" value="submit form"> </form> ~; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Sorting Problem
by merlyn (Sage) on Dec 20, 2000 at 08:05 UTC | |
|
Re: Sorting Problem
by btrott (Parson) on Dec 20, 2000 at 07:32 UTC | |
|
Re: Sorting Problem
by Fastolfe (Vicar) on Dec 20, 2000 at 09:15 UTC | |
|
Re: Sorting Problem
by ichimunki (Priest) on Dec 20, 2000 at 10:15 UTC | |
by chipmunk (Parson) on Dec 20, 2000 at 10:20 UTC | |
by ichimunki (Priest) on Dec 20, 2000 at 11:37 UTC |