On Thu, May 21, 2015 at 3:41 AM, Vincent Lequertier wrote:
> From http://perldoc.perl.org/perlmod.html#Perl-Modules, "1;" is used to end
> with a true value
There is a bit better explanation here:
http://www.perlmonks.org/?node_id=781340
In short, `use' is like syntactic sugar around `require'
From http://perldoc.perl.org/perlmod.html#Perl-Modules, "1;" is used to
end with a true value
---
Vincent Lequertier
s...@riseup.net
Le 2015-05-21 08:13, Sunita Pradhan a écrit :
Hi
Why a perl programmer use 1 or any number as last statement in module
or package (like : 1;)?I checked without t
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 t
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