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

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Intermediate: Re: [rkellerjr] LWP Browser->Get Challenge: Edit Log

Veteran / Moderator

Aug 28, 2013, 11:41 AM

Views: 25603
Re: [rkellerjr] LWP Browser->Get Challenge

16k is considerably less than the expected size as well as considerably less than what you previously stated which was 90 to 95% of the expected size. So, was your original estimate completely wrong or are there other details that you've left out?

If all of the files are the exact same 16k size, then that leads to the next obvious question. Do they all have the same contents?

moving forward, don't assume I'm writing bad code

I never said that you were writing bad code, however, you do have lots of questionable code. For example, this statement.

if ($more = &check_xml)

1) It's already been pointed out that you shouldn't use & when executing the sub.

2) The conditional is not comparing the 2 values to see if they're the same. It's assigning the return value of the sub to $more and then evaluating that var in boolean context. Since you previously assigned $more the string 'yes', I can only assume that the sub returns either 'yes' or 'no'. In boolean context strings will evaluate as true, which is probably not what you intended.

There are a least a dozen other examples in your code, some of them we've already pointed out. We point these out so that you can correct them which will make your code more readable, maintainable, easier to troubleshoot and have fewer bugs.

(This post was edited by FishMonger on Aug 28, 2013, 11:42 AM)

Edit Log:
Post edited by FishMonger (Veteran) on Aug 28, 2013, 11:42 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