develooper Front page | perl.fwp | Postings from July 2003

RE: my if?

Thread Previous | Thread Next
From:
Pense, Joachim
Date:
July 2, 2003 02:33
Subject:
RE: my if?
Message ID:
630BE70C8320D6118D240002A589ABB2088B9F34@DERUM201

Abigail wrote
> 
> 
> On Wed, Jul 02, 2003 at 07:58:03AM +0100, Pense, Joachim wrote:

> > that is often recommended in the Perl community. I think it 
> is easy to see
> > which version looks elegant and which one kludgy:
> > 
> > (Quoted from earlier in the thread, reformatted:)
> > 
> > |   sub x {
> > |       static $vbl ;
> > |       ...
> > |
> > 
> > | {
> > |     my $vbl;
> > |     sub x {
> > |     ...
> > |     }
> > | }
> 
> 
> IMO, not doubt the latter looks far more elegant - as that 
> enables your
> 'static' variable to be shared with more than one function. Something
> you can't do with a 'static' declared variable inside a function.
> 

Mighty != elegant.

Joachim

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About