Ok to start off i would like to say IM NEW TO PERL. so dont laugh at my coding...
#!/usr/bin/perl #---------------------------------------------------------- #Umm in trying this, lets see if it works...<BR> #Trying it, doubt it works..<BR> #---------------------------------------------------------- my $in; if ($ENV{'REQUEST_METHOD'} eq "GET") { $in = $ENV{'QUERY_STRING'}; } else { $in = <STDIN>; } @Texts = ("text1","text2","text3","text4","text5"); print <<ENDhdr; print "Content-Type: text/html\n\n"; print "<html><HEAD><TITLE>Thing...</title></head>"; print "<body><H1>Thing</h1>"; print "<input type=text value=\"$Texts[0]\">\n"; print "<input type=text value=\"$Texts[1]\">\n"; print "<input type=text value=\"$Texts[2]\">\n"; print "<input type=text value=\"$Texts[3]\">\n"; print "<input type=text value=\"$Texts[4]\">\n"; print "<input type=\"submit\" value=\"Submit\" onclick=\"?alpha\">"; ENDhdr sub alpha { sort(@Texts) @Texts = yay; print "$yay"; }
Russ
Brainbench 'Most Valuable Professional' for Perl
In reply to Basic CGI Question (Moved from Q&A) by Russ
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |