Closed Thread
Results 1 to 3 of 3

Thread: need help in counting a specify character in a string.

  1. #1
    lichy is offline Newbie
    Join Date
    Jun 2007
    Posts
    17
    Rep Power
    0

    need help in counting a specify character in a string.

    hi, can anyone tell me how to count the number of times a specify character occurred in a string. for example,

    $string = 'APPLE';

    'P's occurred twice in this string.
    i need to count how many time the 'P's occurred in this string, $string, by using perl programming.

    how can i do that?

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    KevinADC is offline Programmer
    Join Date
    Jan 2007
    Posts
    125
    Rep Power
    0

  4. #3
    lichy is offline Newbie
    Join Date
    Jun 2007
    Posts
    17
    Rep Power
    0
    thanks pal. it's for my major project. anyway, once again... million thanks.

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 7
    Last Post: 10-12-2011, 06:24 AM
  2. Replies: 11
    Last Post: 11-09-2010, 06:23 AM
  3. C++ Counting Help....????
    By jdjd_2009 in forum C and C++
    Replies: 1
    Last Post: 10-20-2010, 07:10 PM
  4. Help with counting program
    By Bertan in forum C and C++
    Replies: 6
    Last Post: 09-14-2010, 04:49 PM
  5. Help - Assembly: counting lower/upper case chars from string
    By Treymac in forum General Programming
    Replies: 1
    Last Post: 03-06-2008, 05:38 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts