When a module is loaded (via use) the compiler will complain unless the
last statement executed when it is loaded is true. This line ensures that
this is the case (as long as you don't place any code after this line).
Perl's way of making sure that it successfully parsed all the way to the
end of the file.

On Thu, May 21, 2015 at 12:44 PM, Uday Vernekar <vernekaru...@gmail.com>
wrote:

> As Per my Understanding...
>
> The last line file must contain the line with the 1; statement. As This
> in effect returns a true value to the program using the module. if you
> are Not using the 1; statement it will not let the module be loaded
> correctly.
>
> On Thu, May 21, 2015 at 11:43 AM, Sunita Pradhan <
> sunita.pradhan.2...@hotmail.com> wrote:
>
>> Hi
>>
>> Why a perl programmer use 1 or any number as last statement in module or
>> package (like : 1;)?
>> I checked without that also package gets loaded .
>>
>> Can somebody please explain properly , it would be good with examples ?
>>
>> Thanks
>> Sunita
>>
>
>
>
> --
> *********************************************************
> Don't ask them WHY they hurt you,
> because all they'll tell you is lies and excuses.
>  Just know they were wrong, and try to move on.
> **********************************************************
>



-- 
*********************************************************
Don't ask them WHY they hurt you,
because all they'll tell you is lies and excuses.
 Just know they were wrong, and try to move on.
**********************************************************

Reply via email to