talexb has asked for the wisdom of the Perl Monks concerning the following question:
I have started to take a hard look at POE, using merlyn's excellent Column 41 as a learning tool.
I'm making progress, but part of the Perl syntax has me confused. Specifically, in one routine merlyn gets the kernel object using my $kernel = $_[KERNEL]; (Line 38) and then uses it with $kernel->yield("ready", "looping"); (Line 48) which is fine, except I'm not familiar with this use of $_.
Later on in the example, in another routine, he skips that nicety and just says $_[KERNEL]->yield("ready", "child done"); (line 65). I'm familiar with @_, but I'm unsure about where $_ comes from in that context.
Can someone elighten me? Thanks.
Alex / talexb / Toronto
"Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds
Update 1: Fixed broken link; thanks zentara
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: POE and $_[KERNEL]
by gellyfish (Monsignor) on Sep 06, 2005 at 18:00 UTC | |
by talexb (Chancellor) on Sep 06, 2005 at 18:04 UTC | |
|
Re: POE and $_[KERNEL]
by zentara (Cardinal) on Sep 07, 2005 at 09:47 UTC |