Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: problem related to project key counter

by toolic (Bishop)
on Aug 13, 2008 at 15:47 UTC ( [id://704103]=note: print w/replies, xml ) Need Help??


in reply to problem related to project key counter

i do not where to start
Start with the free online documentation. From perlfaq4, How can I count the number of occurrences of a substring within a string?.

Adapting the FAQ example to vowels:

use strict; use warnings; while (<DATA>) { chomp; my $str = $_; my $count = ($_ =~ tr/aeiouAEIOU//); print "$str: $count\n"; } __DATA__ Here I am. djghsjkghk It's me.

prints:

Here I am.: 4 djghsjkghk: 0 It's me.: 2

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (7)
As of 2024-04-26 08:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found