Skip to content

Tag Archives: Perl-String

A string in Perl is a scalar variable and start with a ($) sign and it can contain alphabets, numbers, special characters. The string can… Read More
A string in Perl is a scalar variable and start with a ($) sign and it can contain alphabets, numbers, special characters. The string can… Read More
A string in Perl is a scalar variable and start with a ($) sign and it can contain alphabets, numbers, special characters. The string can… Read More
Sorting in Perl can be done with the use of a pre-defined function ‘sort’. This function uses a quicksort algorithm to sort the array passed… Read More
m operator in Perl is used to match a pattern within the given text. The string passed to m operator can be enclosed within any… Read More
length() function in Perl finds length (number of characters) of a given string, or $_ if not specified. Syntax:length(VAR) Parameter: VAR: String or a group… Read More
lc() function in Perl returns a lowercased version of VAR, or $_ if VAR is omitted.  Syntax: lc(VAR)Parameter: VAR: Sentence which is to be converted to… Read More
This function returns the position of the first occurrence of given substring (or pattern) in a string (or text). We can specify start position. By… Read More
Reverse an array or string in Perl. Iterative Way: Iterate over the array from 0 to mid of array. Swap the arr[i] element with arr[size-i]… Read More
split() is a string function in Perl which is used to split or you can say to cut a string into smaller sections or pieces.… Read More
Counting frequency of all words of a string is a basic operation for any programming language. The frequency of each word of the text can… Read More
Removing unwanted spaces from a string can be used to store only the required data and to remove the unnecessary trailing spaces. This can be… Read More
Operators are the foundation of any programming language. Thus, the functionality of Perl programming language is incomplete without the use of operators. A user can… Read More
A string in Perl is a scalar variable and it can contain alphabets, numbers, special characters. The string can consist of a single word, a… Read More
String in Perl is a sequence of character enclosed within some kinds of quotation marks. Perl string can contain UNICODE, ASCII and escape sequence characters.… Read More