Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Perl
Perl Misc
arrange form data in same order as on form
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Eric J. Roode, post: 4747924"] -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I just spent some time perusing this site. It's not a bad site overall, as far as an introduction to CGI programming goes. The way they introduce processing of input variables is fine -- but I wish they had moved immediately on to using CGI.pm, instead of saving it until chapter 17. That code is okay for learning, but is awful for any real work. Yes, you should. CGI.pm is a module that comes with the Perl distribution. It automates much of the dirty work behind processing CGI forms, plus it has some security checks to protect you from DOS attacks. Absolutely. Borrowing and adapting others' code is a great way to learn. Just be aware of the limitations of the code you're using! :-) Most (all?) browsers do submit the variables in the same order that they appear on the form, but this is NOT guaranteed. Besides, why do you need them to be in any particular order? They all have names. Yes, this is much better. However, be aware that CGI.pm does all of this for you. Less typing, and it's already debugged for you. Well, all of your form variables are named, right? So process them in name order. You're welcome. - -- Eric $_ = reverse sort $ /. r , qw p ekca lre uJ reh ts p , map $ _. $ " , qw e p h tona e and print -----BEGIN PGP SIGNATURE----- Version: PGPfreeware 7.0.3 for non-commercial use <[URL]http://www.pgp.com[/URL]> iQA/AwUBP7TImGPeouIeTNHoEQJT4QCfbqG0ESDylR8pTZDPjeaCDAh4Rf0AmgP+ 1ZIw0EXmWZEP5GzNZNCgZz06 =fDlp -----END PGP SIGNATURE----- [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Perl
Perl Misc
arrange form data in same order as on form
Top