CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner: Re: [gerble1000] problem using array inside for loop inside if statement: Edit Log



FishMonger
Veteran / Moderator

Oct 17, 2012, 11:35 AM


Views: 2289
Re: [gerble1000] problem using array inside for loop inside if statement

Wow, that's a perfect example of bad spaghetti code.

Your code indentation is inconsistent (i.e., horrible).

Remove the commented out use statements

Remove the second use CGI statement.

Remove ALL goto statements.

Why are you initializing the @skip and @result arrays and then immediately overwrite those initializations?

Use var names that describe what the vars hold. The @skip and @result var names are too generic and don't say anything about what they hold. Personally, I'd get rid of the results array and use separate scalars for each of those elements. Or if you wish, you could use a %results hash.

What does your skip1..skip8 params supposed to do/represent?

Don't put multiple statements on a single line.

Remove the depreciated <center></center> tags and instead use css to style the page.

Remove the empty else{} block.


(This post was edited by FishMonger on Oct 17, 2012, 11:37 AM)


Edit Log:
Post edited by FishMonger (Veteran) on Oct 17, 2012, 11:37 AM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives