How to count no of occurrence of a unique patterns in perl?

Answer Posted / shah faisal

($count)=$string =~ s/<pattern>/<pattern>/g;

Is This Answer Correct ?    4 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why do you use Perl?

748


Which functions in Perl allows you to include a module file or a module and what is the difference between them?

719


Explain chomp, chop, cpan, tk.

707


How many ways can we express string in Perl?

709


Explain a tell function in perl?

742


How to replace perl array elements?

704


Explain string comparison operators in perl.

769


What is -> symbol in perl?

730


What does last statement do in perl?

751


How to print escaping characters inside a string in perl?

698


Explain the various characteristics of perl.

709


Explain different types of perl operators.

704


Who created perl?

693


How do you turn on the perl warnings?

679


what is the function of Return Value?

756