http://www.perlmonks.org?node_id=237041


in reply to •Re: •Re: Swimsuit issue
in thread Swimsuit issue

I'd like to propose a patch to avoid looping and fetching girls when you're sure there aren't. Please, read your column on that {grin}. Many thanks to larsen for his cooperation in writing this joke.

:))) Valerio

32c32,37 < print +mirror($url, $file), "\n"; --- > if (mirror($url, $file) == RC_NOT_FOUND) { > print "not found\n"; > last; > } else { > print "ok\n"; > }

update: merlyn is ALWAYS right :)

Replies are listed 'Best First'.
•Re: Re: •Re: •Re: Swimsuit issue
by merlyn (Sage) on Feb 20, 2003 at 13:28 UTC
    No the code is deliberately continuing even when I get a 404, because some of the number sequences are not, uhm, sequential. Some of them have a 0 picture, some of them are missing a 4, and so on. No model has over 8 or 9 pix, so I guess I could crank the 15 down to 9.

    Hey, what's the cost of 10 additional 404 probes per model, anyway? It's a fast probe.

    -- Randal L. Schwartz, Perl hacker
    Be sure to read my standard disclaimer if this is a reply.