Perl

Stay ahead with the latest trends in custom software development. Explore how AI, automation, and cloud solutions are shaping the future of business technology.

Perl Lower/Upper Case First Character

Perl Lower/Upper Case First Character ucfirst Takes a string and retruns it with the first character in upper case. [perl] ucfirst Str1 [/perl] lcfirst Takes a string and retruns it with the first character in lower case. [perl] lcfirst Str1 [/perl]
Continue Reading

Perl Index

Perl Index index This function returns the position of the first occurance of the specified SEARCH string. If POSITION is specified, the occurance at or after the position is returned. The value -1 is returned if the SEARCH string is not found. [perl] rindex STRING,SEARCH,POSITION rindex STRING,SEARCH [/perl]
Continue Reading

PERL – Length

PERL – Length [perl] $RESULT = length(EXPRESSION); [/perl] Perl’s length() function simply returns the length of a perl string in characters [perl] $myString = ‘perl.about.com’; $myLength = length($myString); [/perl] In this example, we’ve created a string with the value perl.about.com. When we run the length function on the string, it will return 14, or the […]
Continue Reading

Perl Push Array

Perl Push Array A slightly more interesting kind of variable is the array variable which is a list of scalars (ie numbers and strings). Array variables have the same format as scalar variables except that they are prefixed by an @ symbol. The statement @food = ("apples", "pears", "eels"); @music = ("whistle", "flute"); assigns a […]
Continue Reading