Shlomi Fish writes:
> Hi Harry,
>
> thanks for replying inline (bottom posting).
>
> On Thursday 06 May 2010 16:19:32 Harry Putnam wrote:
>> Shlomi Fish writes:
>>
>>
>> [...]
>>
>> > sub dispatch
>> > {
>> >
>> >my ($method, @rest_of_args) = @_;
>>
>> Not sure what $method is supposed
Hi Harry,
thanks for replying inline (bottom posting).
On Thursday 06 May 2010 16:19:32 Harry Putnam wrote:
> Shlomi Fish writes:
>
>
> [...]
>
> > sub dispatch
> > {
> >
> > my ($method, @rest_of_args) = @_;
>
> Not sure what $method is supposed to be doing.
>
Sorry, I'm usually used
Shlomi Fish writes:
[...]
> sub dispatch
> {
> my ($method, @rest_of_args) = @_;
Not sure what $method is supposed to be doing.
> my %dispatch =
> (
> 'N' => sub { return N_func(@rest_of_args); },
> 'L' => sub { return L_func(@rest_of_args); },
>
Harry Putnam writes:
Egad... I'm messing up what I want to say way too much.
There is an unfortunate type in there...
> But after finally reading your comments.. I'm thinking to stick with
> something more like this pattern.
>
> ,
> | @ar ## already with data inside (global)
> |
> | sub
Akhthar Parvez K writes:
> Why are you calling the subroutine N? Have you already defined a
> subroutine with the name N in your program?
Yes, it was already defined... and I see now how I was nesting a
second call in there... not really what was needed or intended.
thanks.
--
To unsubscri
Thomas Bätzler writes:
>> sub func { %h = ( N => sub { print N(@_) . "\n"; } ); }
>
> If you call the sub like this, it'll create the hash %h containing the
> key "N" associated with a code reference to an anonymous
> subroutine. When that subroutine is called it will pass its _current_
> argumen
On Thursday 06 May 2010 13:24:10 Harry Putnam wrote:
> Philip Potter writes:
> > On 5 May 2010 17:29, Harry Putnam wrote:
> >> Anyway, I understood he was saying NOT global.
> >>
> >> What I asked is why that would matter. That is, the values or
> >> elements in @_ arrive inside the `sub dispt
Harry Putnam writes:
> . . . . ... I'm still not seeing why the
> values in @_ are not available at the call to N() inside like this:
> (incomplete code)
Disregard above.
Sorry about the line noise... I missed the main part of
Phillips' explanation
--
To unsubscribe, e-mail: beginners
Philip Potter writes:
> On 5 May 2010 17:29, Harry Putnam wrote:
>> Anyway, I understood he was saying NOT global.
>>
>> What I asked is why that would matter. That is, the values or
>> elements in @_ arrive inside the `sub dispt {...}', so should be
>> available to anything inside `sub dispt {
On Wednesday 05 May 2010, Harry Putnam wrote:
> But even though I can work with that... I'm still not seeing why the
> values in @_ are not available at the call to N() inside like this:
> (incomplete code)
>
> func($val1,$val2);
>
> sub func { %h = ( N => sub { print N(@_#HERE) . "\n"; } ); }
10 matches
Mail list logo