Perl package Function

Advertisements


Description

This function Changes the name of the current symbol table to NAME. The scope of the package name is until the end of the enclosing block. If NAME is omitted, there is no current package, and all function and variables names must be declared with their fully qualified names.

Syntax

Following is the simple syntax for this function:

package NAME

package

Return Value

This function does not return any value.

Example

To understand package keyword check Perl Modules session.

Following is the example code showing its basic usage:


When above code is executed, it produced following result




Advertisements
Advertisements