On 5 Jun 2001, Randal L. Schwartz wrote:
> chris> I have the following code. This code prints a / for each
> chris> occurance of a certain number/word in a file. How would I
> chris> change this to print a / for each 5 instances of a given
> chris> word/number?
>
> meta-question: Do we have a policy here of suspecting homework
> and handling it appropriately (as in, DON'T GIVE THE ANSWER)?
>
> Cuz this one smells a lot like something I'd assign as a homework
> question (it's very artificial). And remember, there's a heckuva lot
> of classes in Perl around the world now.
Dunno... perhaps a gentle pointer to what they should look at to solve the
problem without givng them the algorithm to do so.
I had an occurrence recently on another list (on Yahoo) when a guy came in
asking for a regexp to parse out email addresses from HTML pages. He got
very angry when no one would give him the answer. :-)
-- Brett
Brett W. McCoy
Software Engineer
Broadsoft, Inc.
240-364-5225
[EMAIL PROTECTED]