This is a discussion on How would you replace a char in string and how do you store the number of replacement within the Perl forums, part of the Software Development category; How would you replace a char in string and how do you store the number of replacements?...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| Hi, Code: #!/usr/bin/perl print "Content-type: text/html\n\n"; $str='Hello'; $cnt= ($str=~s/l/i/g); print 'Count is :'; print $cnt; Quote:
|
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| What is the difference between CHAR and VARCHAR data types? | sundarraja | Database Support | 1 | 02-01-2008 10:36 PM |
| How do I convert a Number into a String with exactly 2 decimal places? | itbarota | HTML, CSS and Javascript Coding Techniques | 2 | 10-26-2007 05:22 AM |
| Use ereg_replace to replace only the first occurence of a string instead of all | itbarota | PHP Programming | 1 | 09-12-2007 12:13 AM |
| Does automation replace manual testing? | devarajan.v | Software Testing | 1 | 07-27-2007 05:35 AM |
| ".Which one works fast concatenation or variable.. replacement ..? | oxygen | PHP Programming | 1 | 07-26-2007 03:30 AM |