Hi Shlomi,

On Wed, 5 Feb 2014 14:20:55 +0200
Shlomi Fish <shlo...@shlomifish.org> wrote:

> Hi Manfred,
> 
> On Wed, 5 Feb 2014 10:51:56 +0100
> Manfred Lotz <manfred.l...@arcor.de> wrote:
> 
> > Hi all,
> > Perl 5.14 allows package blocks.
> > 
> > Assume i have a file Hello.pm
> > 
> > package Hello; {
> >   ...
> > 
> >   1;
> > }
> 
> I think the syntax is «package Hello { ... }» without the semicolon.
> 

You are right. ; isn't required here.


> > # or better here
> > # 1;
> > 
> > 
> > My question is: Would I put 1; inside the { } or should I put it
> > outside the { }.
> > 
> 
> The 1 is for "require" or "use". It is safer to put it as the
> absolutely last thing in the file - outside the { ... }:
> 

Makes sense.



Thanks, Manfred

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to