http://qs1969.pair.com?node_id=912136


in reply to Re^6: count the maximum no.of occurence
in thread count the maximum no.of occurence

This is what the code suggested: ...

I have downloaded the code properly.

Dear saravan,

You did not download the code properly. Like I already told you in Re^7: count the maximum no.of occurence, use the download code link to download the code

And here is the output for that:

Simply repeating what you already said is annoying, esp when other parts of what you are saying are obviously wrong.

Which perl are you using? I get the correct output using v5.12.2

perldeltas says

A pattern containing a + inside a lookahead would sometimes cause an incorrect match failure in a global match (e.g., /(?=(\S+))/g)

#68564: /g failure with zero-width patterns

  • Comment on Re^7: count the maximum no.of occurence

Replies are listed 'Best First'.
Re^8: count the maximum no.of occurence
by roboticus (Chancellor) on Jun 30, 2011 at 10:22 UTC

    Cut & paste is not the same as download. The "+" signs in your sample data exist because you didn't use the download link. Instead you used cut & paste. That would be fine, except that perlmonks wraps long code lines (to prevent lines from uglificating the page). When it does so, it includes a '+' at the beginning of wrapped lines to let you know about it.

    If you use the download link, you'll get a nice plain text page that you can save, and it will be the correct code.

    ...roboticus

    When your only tool is a hammer, all problems look like your thumb.