Values can be returned by a subroutine using an explicit return statement. Otherwise it would be the value of the last expression evaluated.
When we dereference a variable using particular prefix, they are called prefix dereference.
(i) $-Scalar variables
(ii) %-Hash variables
(v) Type globs-*myvar stands for @myvar, %myvar.
The grep function evaluates an expr or a block for each element of the List. For each statement that returns true, it adds that element to the list of returning values.
Differentiate between C++ and Perl.
-C++ does not allow closures while Perl does
-C++ allows pointer arithmetic but Perl does not allow pointer arithmetic
A Chomp function removes the last character from an expr or each element of list if it matches the value of $/. This is considered to be safer than Chop as this removes only if there is a match.
A Chop function removes the last character from EXPR, each element of list.
CPAN is the Comprehensive Perl Archive Network, a large collection of Perl software and documentation. CPAN.pm is also a module in Perl which is used to download and install Perl software from the CPAN archive.
TK is an open source tool kit that is used to build web based applications using Perl.
Perl handles two types of data they are
(i) Scalar Variables and
Scalar variables hold a single data item whereas lists hold multiple data items.