Hi,
I have a module which has "used" strict in it. Then in my perl file i use that module, but should it also include strict pragma in my perl file automatically?(it is not)
Why is it so? Below is the sample code
The script runs successfully even if variable scope is not defined.
--------------------------------------------------------------------------
I never set a goal because u never know whats going to happen tommorow.
I have a module which has "used" strict in it. Then in my perl file i use that module, but should it also include strict pragma in my perl file automatically?(it is not)
Why is it so? Below is the sample code
Code:
#test.pm
package test;
use strict;
sub new {
my($self) = {};
bless $self;
}
sub returnName
{
return "XYZ" ;
}
1 ;
#test.pl
use test ;
$testObj = new test;
$Name = $testObj->returnName() ;
print $Name ;
The script runs successfully even if variable scope is not defined.
--------------------------------------------------------------------------
I never set a goal because u never know whats going to happen tommorow.