What is the difference between module and package?
Answer Posted / kiruthikau
- A module is a .pm file containing some Perl code.
- A package is a declaration of the name of the current
scope, e.g.:
package Math::Complex
- Which can occur in the code of a module or a script.
- A module can be used, because it is a physical
'thing', but a package cannot.
- A module may contain several packages:
| Is This Answer Correct ? | 11 Yes | 3 No |
Post New Answer View All Answers
Explain perl one-liner?
How to convert strings into an array in perl?
How to read multi lines from a file in perl?
Difference between the variables in which chomp function work ?
Explain the meaning of subroutine?
What is the tk module?
What is the use of "stderr()"?
Why Perl aliases are considered to be faster than references?
Explain subroutine in perl?
Explain USE and REQUIREMENT statements?
Which functions in perl allows you to include a module file. State their differences.
Which operator in perl is used for the concatenation of two strings?
What happens to objects lost in "unreachable" memory, such as the object returned by Ob->new() in `{ my $ap; $ap = [ Ob->new(), $ap ]; }' ?
Differences between die and exit.
What is the use of –w?