On Wed, Dec 10, 2008 at 07:55, Christoph Kiefer <[EMAIL PROTECTED]> wrote: > Dear all > > What is the precise difference between the two ways of generating an > inside-out-object? > > 1/ > my $node = bless \do { my $anonymous }, ref($class) || $class; > > 2/ > my $a; > my $node = bless \$a, ref($class) || $class; > > In other words, why is it suggested in most books, web to have an > /anonymous/ scalar. > Any help, hint, reference is highly appreciated. > > Christoph >
As far as I can tell, it is for two reasons: 1. you aren't using the scalar itself, so to avoid confusion its scope is limited to its creation 2. it all fits on one line -- Chas. Owens wonkden.net The most important skill a programmer can have is the ability to read. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/