Re: [plug] Question about Perl Closure [OT]

2009-12-01 Thread Sherwin Daganato
On Tue, Dec 1, 2009 at 10:56 PM, Ludwig Isaac Lim wrote: > >   Can we say closures are anonymous coderefs that acesses a pre declared > variable? Nahuli na ba ako? :-) In Perl, a closure is just a subroutine that has access to persistent private variables. It can either be a named subroutine or

Re: [plug] Question about Perl Closure [OT]

2009-12-01 Thread Zak B. Elep
Hi! On Tue, Dec 1, 2009 at 10:56 PM, Ludwig Isaac Lim wrote: > Hi: > >   I'm having some hard time understand perl closure: > >   Here's an explanation from Intermediate Perl: >   "The kind of subroutine that can access lexical variables that existed at > the time we declare it is called a closu

Re: [plug] Question about Perl Closure [OT]

2009-12-01 Thread Mark David Dumlao
First of all, may I apologize for my lack of perl-fu so I may be doing this wrong. On Tue, Dec 1, 2009 at 10:56 PM, Ludwig Isaac Lim wrote: >    My question is "$total_size" is not out of scope since it is declared > before "find(sub.." right? Yes and no. Without strict, $total_size would still

Re: [plug] Question about Perl Closure [OT]

2009-12-01 Thread Robert Locke
Hi Ludwig, "$total_size" is not out of scope because it is implicitly global since it was not declared with "my" in the subroutine. If you remove the initial declaration, the code still works. If, within the subroutine, you do... find (sub {my $total_size += -s if -f},'.'); ... the c

[plug] Question about Perl Closure [OT]

2009-12-01 Thread Ludwig Isaac Lim
Hi: I'm having some hard time understand perl closure: Here's an explanation from Intermediate Perl: "The kind of subroutine that can access lexical variables that existed at the time we declare it is called a closure .In Perl terms, a closure is just a subroutine that references a

Re: [plug] A 5-year-old girl installs Ubuntu

2009-12-01 Thread Mark David Dumlao
On Tue, Dec 1, 2009 at 2:44 PM, Daniel Escasa wrote: > Choice quote: “Hey, if you just press Enter, it usually works out." > http://www.fsdaily.com/Community/The_Un_Scary_Screwdriver, or > http://www.gnomejournal.org/article/88/the-un-scary-screwdriverhttp://www.gnomejournal.org/article/88/the-un-