What is the difference between having a parenthesis after
module name and without parenthsis after module name??
i.e Package::Module();
and
Package::Module;
Answer Posted / ankur mundhada
Package::Module(); This will throw as error,
I think,the question should be as: What is the difference
between,
Package::MyModule qw(); # FIRST
and
Package::MyModule; # SECOND
# FIRST :- This will not import any subroutine from MyModule.
# SECOND :- This will import all the subroutine from the
MyModule.
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
explain the various functions/directives in perl that allow you to include/import a module. Also, state the differences between them.
Suppose an array contains @arraycontent=(‘ab’, ‘cd’, ‘ef’, ‘gh’). How to print all the contents of the given array?
Explain cpan?
What happens to objects lost in "unreachable" memory, such as the object returned by Ob->new() in `{ my $ap; $ap = [ Ob->new(), $ap ]; }' ?
You want to empty an array. How would you do that?
Explain perl. When do you use perl for programming? What are the advantages of programming in perl?
How to turn on Perl warnings? Why is that important?
Can you add two arrays together?
What rules must be followed by modules in perl.
What is perl programming?
Explain USE and REQUIREMENT statements?
I have one question regarding to eval function. I know eval function is use for error checking but I am not able to understand below line. eval \'exec perl -S $0 ${1+\"$@\"}\' if 0; $0 for script name $@ set if error occur
What is the use of -t?
If EXPR is an arbitrary expression, what is the difference between $Foo::{EXPR} and *{"Foo::".EXPR}?
How to read file into hash array ?