Explain regular expression in perl?
Answer / Devendra Dangwal
Regular expressions (regex) are sequences of characters that form a search pattern. They are used to match, search, and manipulate text in Perl. Some common regex elements include:
* ^ - matches the start of a line
* $ - matches the end of a line
* . - matches any single character except a newline
* [] - matches any character inside the brackets
* () - groups characters for reuse or priority
* | - matches either of the patterns on its left or right
* ?, +, * - quantifiers that specify how many times a pattern should match
| Is This Answer Correct ? | 0 Yes | 0 No |
sort a word "system" in perl/shell without using built in functions output should be emssty
my @array=('data1','data2'); my @array1=('data1','data2'); my ($i,$k); $i=7; $k=7; while($i){ $array [++$#array] = 'ree'; $i--; print "@array"; } while($k){ push(@array1,'ree'); $k--; print "@array1"; } Are these two while loop are doing the same functionality ? What may be the difference?
Explain different types of perl operators.
Is there any way to add two arrays together?
Which functions in Perl allows you to include a module file or a module and what is the difference between them?
Write a script for 'count the no.of digits using regular expressions in perl..
In Perl we can show the warnings using some options in order to reduce or avoid the errors. What are that options?
Explain the use of 'my' keyword in perl?
What are perl variables?
Why do we use "use strict" in perl?
What is the use of -w, -t and strict in Perl?
How to connect to SQL server through Perl?