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
Assuming both a local($var) and a my($var) exist, what's the difference between ${var} and ${"var"}?
What are prefix dereferencer? List them.
Elaborate on perl bite-wise operators.
What is the purpose of _package_ literal?
What is the importance of perl warnings? How do you turn them on?
Explain the use of 'my' keyword in perl?
What is boolean context?
Write an example explaining the use of symbol tables.
What is “grep” function in perl?
What are the advantages and disadvantages of perl language?
What are some common methods to all handles in perl?
How can you define “my” variables scope in Perl and how it is different from “local” variable scope?
what is the main function of fork() in cgi programming?
What is the difference between use and require in perl programming?
Differentiate between arrays and list in perl.