Lost Password?

Go Back   CodeCall Programming Forum > Web Development Forum > Perl

Perl Discussion for the PERL language - Practical Extraction and Reporting Language, is a programming language often used for creating CGI programs.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-27-2007, 02:01 AM
lichy lichy is offline
Newbie
 
Join Date: Jun 2007
Posts: 17
Rep Power: 5
lichy is on a distinguished road
Default 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?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 06-27-2007, 03:14 AM
KevinADC KevinADC is offline
Learning Programmer
 
Join Date: Jan 2007
Posts: 89
Rep Power: 6
KevinADC is on a distinguished road
Default

homework?

How-can-I-count-the-number-of-occurrences-of-a-substring-within-a-string
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 06-27-2007, 10:03 PM
lichy lichy is offline
Newbie
 
Join Date: Jun 2007
Posts: 17
Rep Power: 5
lichy is on a distinguished road
Default

Quote:
Originally Posted by KevinADC View Post
thanks pal. it's for my major project. anyway, once again... million thanks.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Help] String manipulation. afiser Visual Basic Programming 1 05-31-2007 03:24 PM
Is string in array? smith Perl 2 02-14-2007 01:30 PM
Accessing a string by array Saint C# Programming 3 10-03-2006 07:33 PM
Seperate values in a string Chan C# Programming 4 07-25-2006 09:17 AM
Removing HTML from a String using ColdFusion roger ASP, ASP.NET and Coldfusion 0 05-11-2006 10:19 PM


All times are GMT -5. The time now is 03:22 PM.

Contest Stats

John ........ 223.00000
dargueta ........ 168.00000
Xav ........ 164.00000
gaylo565 ........ 18.00000
WingedPanther ........ 15.00000
|pH| ........ 15.00000
Johnnyboy ........ 3.00000
navghost ........ 1.00000

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 65%

Ads