Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re^7: count the maximum no.of occurence

by Anonymous Monk
on Jun 30, 2011 at 09:55 UTC ( #912136=note: print w/replies, xml ) Need Help??

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.


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

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://912136]
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2023-12-03 13:08 GMT
Find Nodes?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?

    Results (20 votes). Check out past polls.