Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: how to to find the "/" in a string

by AnomalousMonk (Abbot)
on Aug 31, 2012 at 19:01 UTC ( #991076=note: print w/ replies, xml ) Need Help??


in reply to Re: how to to find the "/" in a string
in thread how to to find the "/" in a string

count=0, while ($html =~ [aug<\/td>]g) { $count++ }

Please don't post code that won't work – or, in this case, even compile. (Or if the code is untested, please flag the fact prominently.) A beginning Perler, even one as reluctant as robertw to read basic documentation, deserves better of us.

>perl -wMstrict -le "my $html = 'xxx aug</td> yyy aug</td> zzz'; ;; my $count = 0; while ($html =~ m[aug</td>]g) { $count++ } print $count; ;; my $count2 =()= $html =~ m{ aug</td> }xmsg; print $count2; " 2 2


Comment on Re^2: how to to find the "/" in a string
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (10)
As of 2015-07-07 10:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (88 votes), past polls